Question: bedtools closest return no output!
0
gravatar for seta
15 months ago by
seta1.4k
Sweden
seta1.4k wrote:

Dear all,

I'm trying to get the upstream and downstream genes of a specific long non-coding RNA (lncRNA) in rat. To this end, I download the rat GTF file from Ensembl and converted to bed format by fgrep -w gene rat.gtf | sed 's/[";]//g;' | awk '{OFS="\t"; print $1, $3, $4-4,$5,$12,0,$7,$18,$14,$10}' > gene.bed. Then, sort the file with sort -k1,1 -k2,2n and finally used bedtools closest -a myfile.bed -b gene_sorted.bed But, I have not got any output, the tool also returned no error. How is it possible no genes around my lncRNA of interest? Could you please let me know what's wrong?

Thanks

nearest gene gtf bedtools • 305 views
ADD COMMENTlink modified 15 months ago • written 15 months ago by seta1.4k

Please show a head of all relevant files. Maybe different chromosome identifiers, 1 vs chr1.

ADD REPLYlink modified 15 months ago • written 15 months ago by ATpoint40k

Thanks, the files have not such a problem that you mentioned. I tried bedtools window and worked well. Sorry, what's the main difference between these two options, closest and window?

ADD REPLYlink modified 15 months ago • written 15 months ago by seta1.4k

FYI bedtools can take GTF/GFF files instead of BED files, so there's not need to convert your GTF. As ATpoint said, if you show us the first few lines of each file it would help to figure out the error.

ADD REPLYlink written 15 months ago by colin.kern930
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: 1258 users visited in the last hour