This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BEDTools coverage or intersect

Hello, I'm having a problem with bedtools that I don't know how to solve. I have a file with this kind of information:

chr19   frame_2_peak_20020  noCDS   184940  185402  .   +   .   433

And another one with:

chr19   StrAnA  transcript  184909  186112  .   +   .   gene_id "candidate_350";

They are obviously overlapping, however when I do:

bedtools coverage -a candidates_noint.sorted.gtf -b peaks_78.sorted.gtf -s

I get the following result:

chr19       StrAnA  transcript      184909  186112  .       +       .       gene_id "candidate_350";        0       0       1204    0.0000000

I don't get why I'm getting this result, I checked the format like 100 times, maybe I'm not seeing something :/

I tried to use bedtools intersect and as expected after see the results I got with coverage I get an empty file.

Thank you!

software error

1 answer

Your files are not in bed-format https://genome.ucsc.edu/FAQ/FAQformat.html#format1

But I have used the same format before and I got results:

chr22        StringTie       exon    354097  359650  1000    +       .       gene_id "MSTRG.8010"; transcript_id "MSTRG.8010.1"; exon_number "1";    1       475    5554     0.0855239

And the program is supposed to work with gff and gtf files as well.

Ok, it was not clear immediately that you are trying to run GTF file

And at my end, it works just fine..

chr19   StrAnA  transcript  184909  186112  .   +   .   gene_id "candidate_350" 1   463 1204    0.3845515

Did you edit a typo in the msg (Chr1 instead of Chromosome19)?

I had a space at the begining of chr in one of the files. I feel stupid now hahah.

Many thanks!

Silly mistakes do happen always. Genius is to recognize them :)

I've moved my comment as answer as essentially this resolves your problem.

Log in to answer this question.