Entering edit mode
11 months ago
sata72
•
0
I want to use several command in linux, and for second command I want to use the output of first and etc. I have tried this but im not sure that use the out put of first command for the second!
Thanks in advance!
bed file:
2 1376 1477 4
2 1477 1516 2
2 1516 1520 4
2 1520 1521 2
Command:
awk '$4 >=20 {print}' *.bed bedtools multiinter -i *.bed > output.bed
I think
pipes
(symbol|
) is what you're looking for.See the following
bash
tutorial on pipes: https://linuxhint.com/bash_pipe_tutorial/... > file.ext
- this syntax means you explicitly want to gather the information in to a file.Instead, you want to pipe (
|
) the output to the next program.Important to note:
I dont know using the "file.ext", is the good idea. There are several files *.bed. so this files at first shoud be filtered and then would use for the beedtools. the output of bedtools would be one file: out.bed. I used this command but it not work, it needs to be modified.
You don't need to use
echo
. The content will be printed to STDOUT anyway.Suggest you spend some time learning the basics of Bash piping.
As it stands this question isn't really bioinformatics related and may be considered off-topic.
please, explain what you're trying to do with this/those(?) bed files.
At first i want to have a filter with column 4 and keep the data that (4 >=20), at second I want to use this files that filters for input of bedtools to finding overlapped sections.
something like ?
Thanks so much dear Pierre I seems it works, I have a ouput as I expected, First can you tell me why you use both "multiinter and intersect"?
please, read the manuals to understand the difference.