Hi,
I have searched the forums (closest thing was this: seqanswers.com/forums/showthread.php?t=31625 but no replies) and done a lot of trial and error on my own, but can't come up with a good solution to this so I'm hoping someone here will have an idea!
I'm working with xenograft models so have aligned my reads (paired end) separately to human and mouse as I want to get an idea of the levels of contamination from mouse, and devise the best strategy to deal with mouse reads from there.
So I have two BAM files (1 for human, 1 for mouse); for each of those I've extracted the mapped and unmapped reads using samtools (-f4 and -F4 options).
I now want to, for example, compare/intersect the reads that map to both human and mouse for a given sample. A sort of intersectBed but with 2 BAM files (bedtools only seems to accept one BAM file + 1 bed file);
I have tried using the CompareSAMs function in Picard tools but it just tells me for each read that they're not the same in each file "read name ceases agreeing" (doesn't seem to do any searching):
Any hints would be much appreciated!
Thanks
PS: I'm also using the Xenome tools in parallel, but want to do this manually as well as a form of sanity check.
I have searched the forums (closest thing was this: seqanswers.com/forums/showthread.php?t=31625 but no replies) and done a lot of trial and error on my own, but can't come up with a good solution to this so I'm hoping someone here will have an idea!
I'm working with xenograft models so have aligned my reads (paired end) separately to human and mouse as I want to get an idea of the levels of contamination from mouse, and devise the best strategy to deal with mouse reads from there.
So I have two BAM files (1 for human, 1 for mouse); for each of those I've extracted the mapped and unmapped reads using samtools (-f4 and -F4 options).
I now want to, for example, compare/intersect the reads that map to both human and mouse for a given sample. A sort of intersectBed but with 2 BAM files (bedtools only seems to accept one BAM file + 1 bed file);
I have tried using the CompareSAMs function in Picard tools but it just tells me for each read that they're not the same in each file "read name ceases agreeing" (doesn't seem to do any searching):
Code:
java -jar CompareSAMs.jar mapped_to_human.sorted.bam mapped_to_mouse.sorted.bam
Thanks
PS: I'm also using the Xenome tools in parallel, but want to do this manually as well as a form of sanity check.
Comment