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

--paired #14

Open
ghost opened this issue Dec 18, 2019 · 1 comment
Open

--paired #14

ghost opened this issue Dec 18, 2019 · 1 comment
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Dec 18, 2019

Hello,

I have successfully ran xenomapper on xenograft PE WGS data aligned using bwa mem hs37d5 (primary) and mm10 (secondary):

xenomapper --primary_bam "$PRIMARY".merged.dedup.rnsort.test.bam     --secondary_bam "$SECONDARY".merged.dedup.rnsort.test.bam     --primary_specific >(samtools view -bS - > "$PRIMARY"-specific.bam)     --secondary_specific >(samtools view -bS - > "$SECONDARY"-specific.bam)     --unassigned >(samtools view -bS - > "$DIR$SAMPLE"-unassigned.bam)
--------------------------------------------------------------------------------
Read Count Category Summary

|       Category                                     |     Count       |
|:--------------------------------------------------:|:---------------:|
|  primary_multi                                     |             29  |
|  primary_specific                                  |            377  |
|  secondary_multi                                   |              3  |
|  secondary_specific                                |             23  |
|  unresolved                                        |              8  |

However, when I use the --paired option (on the same data) I receive the following error:

xenomapper --primary_bam "$PRIMARY".merged.dedup.rnsort.test.bam     --secondary_bam "$SECONDARY".merged.dedup.rnsort.test.bam     --primary_specific >(samtools view -bS - > "$PRIMARY"-specific.bam)     --secondary_specific >(samtools view -bS - > "$SECONDARY"-specific.bam)     --unassigned >(samtools view -bS - > "$DIR$SAMPLE"-unassigned.bam)     --paired
Traceback (most recent call last):
  File "/home/561/lo6532/.local/bin/xenomapper", line 8, in <module>
    sys.exit(main())
  File "/home/561/lo6532/.local/lib/python3.7/site-packages/xenomapper/xenomapper.py", line 729, in main
    tag_func=tag_func)
  File "/home/561/lo6532/.local/lib/python3.7/site-packages/xenomapper/xenomapper.py", line 398, in main_paired_end
    for line1,line2 in readpairs:
  File "/home/561/lo6532/.local/lib/python3.7/site-packages/xenomapper/xenomapper.py", line 80, in getBamReadPairs
    assert line1[0] == line2[0]
AssertionError

I should also mention, after running xenomapper the primary_specific bam file is returning only single reads which seems strange . Are you able to comment on this?

Any help would be greatly appreciated :) Thanks!

@genomematt
Copy link
Owner

The error here is indicating the the expected interleaved forward and reverse reads is not occuring in the bam. Most frequently this is due to supplementary alignments. Try filtering to only primary alignments with samtools view -F 256 input.bam and see if that fixes your issue. Another alternative is that you may have reads that do not have a pair in your data. To keep only correctly mapping pairs use samtools view -f 2 input.bam

@genomematt genomematt self-assigned this Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant