Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junctions extract producing blank file (no output) #139

Open
andreismol opened this issue Oct 20, 2020 · 9 comments
Open

junctions extract producing blank file (no output) #139

andreismol opened this issue Oct 20, 2020 · 9 comments

Comments

@andreismol
Copy link

andreismol commented Oct 20, 2020

Hi

I'm trying to use junctions extract to produce a junctions.bed file from a BAM file aligned by minimap2 (contains nanopore data).

When I try to do this, nothing goes to stdout and if I specify an output file, it is completely blank.

Any ideas what might cause this behaviour, or how to deal with it?

(base) oates_binf_1@oates-binf-1:/media/drive3/mouse_basecall/mouse_cdna_aligned$ regtools junctions extract -s 0 mouse.firstrun.hac.bam

Program:	regtools
Version:	0.5.2
Minimum junction anchor length: 8
Minimum intron length: 70
Maximum intron length: 500000
Alignment: mouse.firstrun.hac.bam
Output file: NA

(base) oates_binf_1@oates-binf-1:/media/drive3/mouse_basecall/mouse_cdna_aligned$ 
@elisonigit
Copy link

Hey @andreismol,

I was just wondering if you managed to solve this issue and how?I have the exact same problem and I have absolutely no idea how to solve it.

Thank you in advance

@kcotto
Copy link
Contributor

kcotto commented May 6, 2021

Hi @andreismol,

After doing some preliminary digging, it may be an issue with how the CIGAR strings are encoded for the reads corresponding to the long read data (particularly from Nanopore). Is it possible for you to share a few lines of your bam file so that we can try to troubleshoot this on our end?

@kcotto
Copy link
Contributor

kcotto commented May 6, 2021

The same goes for you @elisonigit if you're willing to share a few lines of your bam file.

@andreismol
Copy link
Author

Hi @kcotto

Here are the first 150 lines from the BAM file (as plaintext, created through samtools).
Let me know if you need the whole BAM and I'll find a way to upload/link.

Thanks!

sam.zip

@andreismol
Copy link
Author

And @elisonigit - as I'm sure you've gathered, I haven't had any luck with this either.

@elisonigit
Copy link

elisonigit commented May 7, 2021

Hi @kcotto

Here is a sample of my BAM file. I found actually a possible issue and I managed to get an output that it was not blank. But I would really appreciate it if you have any comment on the BAM file, as I encountered some problems further down in my analysis. I set the parameter -s 0, but the column I get in the .bed file is just questionmarks. Any idea why is this happening?I also tried -s 1 and -s 2 but I still get a column with both questionmarks and with +/-.

sampled.bam.zip

Thanks!

@elisonigit
Copy link

Hi @andreismol
In my case it helped running minimap2 with -ax splice -uf. Apparently, by default minimap2 excludes alignments that include introns, so you need to manually select for it. For me it worked, and I managed to produce a junction file that was not empty, but I still have some issues with the strand tags.

I hope you will find this comment helpful.

@andreismol
Copy link
Author

andreismol commented May 7, 2021 via email

@nsteinau
Copy link

Was wondering if there were any updates on this front?

I have been encountering the exact same issue and cannot figure it out. I keep running into the same issue, both with the BAM files I aligned and test BAM files from the regtools github. The BAM files were appropriately sorted and indexed. It appears the program simply doesn’t produce any output, whether or not I attempt for it to go to STDOUT or using the -o flag. Here I am running this on some of the test data that was provided, but I encounter the exact same issue when using my BAM files. I used STAR to align the reads with "--outSAMstrandField intronMotif " and only some of the reads have an XS tag denoting strand.
/

(base) [xxxx@mforgehn5 leaf_cutter]$ regtools junctions extract -s XS -a 8 -m 50 -M 500000 regtools/tests/integration-test/data/bam/cis_ase_tumor_rna.bam
/tmp/m276075.singularity_cache

Program:        regtools
Version:        1.0.0
Minimum junction anchor length: 8
Minimum intron length: 50
Maximum intron length: 500000
Alignment: regtools/tests/integration-test/data/bam/cis_ase_tumor_rna.bam
Output file: NA

This is what several of my BAM lines look like:

(base) [m276075@mforgehn5 leaf_cutter]$ samtools view bam_files/PM-362.bam | head
A00938:420:HY33YDRX2:2:2101:21594:15468 163     chr2    68394084        255     1S100M  =       68394194        210     CTGAACAACTCCTTTCTTCTTTAGGCAGAAGATCCCCTGGGAGCAATTCACTTGAGAGGCTGTGTGGTGACTTCAGTGGAGAGCAACTCAAATGGTAAGAT        ,:FFFFFFFFFFFFFFFFFFFFF:FFFFF:,FFFFFFFFF,FF:FFF:FFFFFFFFF:,F:FF:FFFFFF,FFFF:FF,FFFFFFFFFFFFFFFFFFFFF,        NH:i:1  HI:i:1  AS:i:198        nM:i:0
A00938:420:HY33YDRX2:2:2101:21594:15468 83      chr2    68394194        255     100M1S  =       68394084        -210    GTGAGAGAGGTGGGTCTGCTCAGACTCCCCTCCCACACCTGGACATCCTGGGCCAACATTAATCAATCAATCAATTAATCAGGATAAGCAGGAATGGGGCT        :FFFF:FFFFFFF:FFF:FFFFFFFFFFFFFFFF:FFF:F:FF:FFFFFF:,FFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFF:FFFFF:FF,        NH:i:1  HI:i:1  AS:i:198        nM:i:0
A00938:420:HY33YDRX2:2:2101:21667:15468 163     chr11   13377432        255     1S100M  =       13377470        138     GCCTGAACCTTCTATCTCTTAAACTTCGTCACCACTATTGCTATTTCACCCTCCTCATCTGCTGCCTGGATTATTGCAAATCACTTCGCAACTCTATTCCC        ,FFFFFF,FFF::F,FFFFFFFFFFF:::,FF,FFFFFFFF,FFFF:FFFF:,FFFFFFF:FFFFF:FFFFF:F:,:F:FF:FF,FFF,FF:,:FF,,,:F        NH:i:1  HI:i:1  AS:i:194        nM:i:2
A00938:420:HY33YDRX2:2:2101:21667:15468 83      chr11   13377470        255     100M1S  =       13377432        -138    GCTATTTCACCCTCCTCATCTGCTGCCTGGATTATTGCAAATCACTTCGCAACTCTAGTCCCCTTCTCCCCACCCCATCCTCCATTGTAGTTCATTCTCCA        :FFFFFFFFFFFFFFFF:FFF:FF:F:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,FFF,FFFF:FFFFFFFFFFF:FFFFFFFFFFF,FFFF:F,        NH:i:1  HI:i:1  AS:i:194        nM:i:2
A00938:420:HY33YDRX2:2:2101:21793:15468 99      chr7    968119  255     1S100M  =       968291  273     TGTGCAGGGACACAGGGTTGGGCGGGCCCAGCCGCAATAGGTACTCAGTTCTGTGAGGAGGGGAGGGACATGTTTAACCACGAAAGGGCCACCACTGCAGG        :FF:FFFFFFFFFFFFF:FFFF:FFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFNH:i:1  HI:i:1  AS:i:199        nM:i:0
A00938:420:HY33YDRX2:2:2101:21793:15468 147     chr7    968291  255     101M    =       968119  -273    GACGAGGGCAGCCTGTTTCCCAGAGCCTGAGGTCGGCCAGATTGGTGGCCCCACCTGCCAGGGCTTGGAGACAGCCACTGCCAGGGTCGCCAGAGAGGACG        FFFFFFFFFFFFFFFF:FF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFNH:i:1  HI:i:1  AS:i:199        nM:i:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants