Question: How to apply bedtools intersect function with GNU parallel for bacth BED file comparison?
0
gravatar for texaswhiskey1969
20 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 20 months ago by ATpoint23k • written 20 months ago by texaswhiskey19690
0
gravatar for ATpoint
20 months ago by
ATpoint23k
Germany
ATpoint23k 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 20 months ago by ATpoint23k
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: 1965 users visited in the last hour