Question: How to apply bedtools intersect function with GNU parallel for bacth BED file comparison?
0
gravatar for texaswhiskey1969
13 months ago by
texaswhiskey19690 wrote:

Here is my code:

parallel bedtools intersect -a g7.bed -b {} -wao > {}.bedtools_intersections_results_complete ::: *.bed

I want to compare all .bed files in the directory to a predone g7.bed file with drug resistance mutations therein. Need help on how to apply GNU parallel correctly. Thx. Your forum is very useful.

ADD COMMENTlink modified 13 months ago by ATpoint14k • written 13 months ago by texaswhiskey19690
0
gravatar for ATpoint
13 months ago by
ATpoint14k
Germany
ATpoint14k wrote:
ls *.bed | parallel "bedtools intersect -a g7.bed -b {} -wao > {.}_.bedtools_intersections_results_complete"

The {} means that the exact file is used that comes from the ls-pipe. {.} will remove the file suffix, so ".bed".

ADD COMMENTlink written 13 months ago by ATpoint14k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2333 users visited in the last hour