Bedtools Slop for Specific Features
1
1
Entering edit mode
6.4 years ago
gtasource ▴ 60

I want to use Bedtools Slop on a GTF file, but only on specific features (for example only for those labeled as gene, or exon, ect.)

I have been trying to pipeline the command with awk, but to no avail:

awk '{ if ($3 == "gene") | bedtools slop -i A.bed -g my.genome -l 2 -r 3

Any help would be great!

bedtools awk • 1.6k views
ADD COMMENT
1
Entering edit mode
6.4 years ago
Jeffin Rockey ★ 1.3k

Please give it like below

awk '$3=="gene"{print}' my.gtf | bedtools slop -i -  -g my.genome  -l 2 -r 3
ADD COMMENT

Login before adding your answer.

Traffic: 1977 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6