I've just release version 0.3 of tophat-recondition (https://github.com/cbrueffer/tophat-recondition), and it may fix the "Mapped mate should have mate reference name" problem id0 was seeing.
The details are in TopHat bug #16, https://github.com/infphilo/tophat/issues/16 and tophat-recondition bug #1 https://github.com/cbrueffer/tophat-...ition/issues/1.
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
Yes, this is seperate indeed. The point of tophat-recondition is to fix issues that prevent unmapped.bam from being used by downstream tools (i.e., to make it possible to merge accepted_hits.bam and unmapped.bam, and feed the merged file to a QC software).
Leave a comment:
-
You are correct, there is indeed output for unmapped_fixup.bam but not unmapped.bam.
I still think it's really weird that there are no duplicates in the unmapped file, but that must be a separate issue.
Leave a comment:
-
Sounds like it might have an effect, I don't have experience with that option myself. To see the effect of the script itself, try running the following command on unmapped.bam and unmapped_fixup.bam:
Code:samtools view -f 0x8 unmapped.bam
Leave a comment:
-
So it got it to run if I stayed in the same directory as tophat-recondition.py and removed -hv command, and pointed it to the tophat output directories. I think the reason why is because on the cluster, HTseq is installed under one version of python, and pysam under another. If I use the version of python in my local directory, it runs. It produced an output file unmapped_fixup.bam. However when I run samtools flagstat on the unmapped.bam and the unmapped_fixup.bam, the flagstat summaries are the same…
samtools flagstat unmapped_fixup.bam
8903498 + 2048970 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
0 + 0 mapped (0.00%:0.00%)
8903498 + 2048970 paired in sequencing
4380074 + 1096160 read1
4523424 + 952810 read2
0 + 0 properly paired (0.00%:0.00%)
0 + 0 with itself and mate mapped
0 + 0 singletons (0.00%:0.00%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
samtools flagstat unmapped.bam
8903498 + 2048970 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
0 + 0 mapped (0.00%:0.00%)
8903498 + 2048970 paired in sequencing
4380074 + 1096160 read1
4523424 + 952810 read2
0 + 0 properly paired (0.00%:0.00%)
0 + 0 with itself and mate mapped
0 + 0 singletons (0.00%:0.00%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
somehow I just can't believe that none of the unmapped reads are duplicates…could this be a consequence of me running tophat with the --no-mix option turned on?
Leave a comment:
-
Originally posted by bpb9 View PostDoes this program need to be installed in the same directory as the unmapped bams that need to be reconditioned? I can't seem to get the program to work. I have python and pysam installed, but the program doesn't run.
wget https://github.com/cbrueffer/tophat-...ive/master.zip
unzip master
set PATH to /home/user/tophat_recondition/tophat-recondition-master
set PATH to /cluster/software/python2.7.6/bin
#Try tophat-recondition
tophat-recondition.py -hv /home/scratch/user/Flowcell1/Raw_PE/sampleID/sampleBAM /home/scratch/user/Flowcell1/Raw_PE/sampleID/
The script can be run from whereever you like, as long as python and pysam can be found.
Leave a comment:
-
How to use?
Originally posted by offspring View PostShort update: the script posted earlier in this thread has seen some updates (Python 3 compatibility, better argument handling etc) and is now called tophat_recondition.
It can be found here: https://github.com/cbrueffer/tophat-recondition
wget https://github.com/cbrueffer/tophat-...ive/master.zip
unzip master
set PATH to /home/user/tophat_recondition/tophat-recondition-master
set PATH to /cluster/software/python2.7.6/bin
#Try tophat-recondition
tophat-recondition.py -hv /home/scratch/user/Flowcell1/Raw_PE/sampleID/sampleBAM /home/scratch/user/Flowcell1/Raw_PE/sampleID/
Leave a comment:
-
Short update: the script posted earlier in this thread has seen some updates (Python 3 compatibility, better argument handling etc) and is now called tophat_recondition.
It can be found here: https://github.com/cbrueffer/tophat-recondition
Leave a comment:
-
Yes, that's quite possible. We don't use any options like this in our TopHat commandline, as far as I see.
Leave a comment:
-
The FASTQs were not filtered.
I am thinking this may be due to TopHat parameters like "--prefilter-multihits" to exclude multi-mapped reads. I believe those reads would not end up in either accepted_hits.bam or unmapped.bam.
Leave a comment:
-
The problematic reads are unmapped ones in unmapped.bam with the "mate is unmapped" flag not set. This means their mates would be expected to be mapped and in accepted_hits.bam; however they are not in there. This is a problem, as my script needs these mapped reads to update some fields in their unmapped mates. Because these fields cannot be updated, Picard barfs later on. The samtools output you posted earlier indicates this is also the problem in the original files.
Do you filter your fastq files in any way before handing them to TopHat?
Leave a comment:
-
You were right, with the mm10 genome I can reproduce the problem. I'll see what I can find.
Leave a comment:
-
I think we are just using different reference sequences. I was using the iGenomes version of mm10.
I trimmed the original FASTQs to generate those BAMs.
Which Picard tool are you using? I just tried using SortSam, which does not require a reference sequence. That still gives me the same "Mapped mate should have mate reference name" errors for the merged BAM.
Code:java -Xmx16G -jar ${PICARD_ROOT}/SortSam.jar \ VERBOSITY=WARNING QUIET=true VALIDATION_STRINGENCY=LENIENT \ SORT_ORDER=coordinate \ INPUT=all.bam \ OUTPUT=all.sortsam.bam
Code:Ignoring SAM validation error: ERROR: Record 113550, Read name HISEQ01:267:H77T6ADXX:1:1101:15356:2352, Mapped mate should have mate reference name Ignoring SAM validation error: ERROR: Record 114728, Read name HISEQ01:267:H77T6ADXX:1:1101:6588:2773, Mapped mate should have mate reference name Ignoring SAM validation error: ERROR: Record 115145, Read name HISEQ01:267:H77T6ADXX:1:1101:15768:2826, Mapped mate should have mate reference name Ignoring SAM validation error: ERROR: Record 115811, Read name HISEQ01:267:H77T6ADXX:1:1101:12628:3135, Mapped mate should have mate reference name Ignoring SAM validation error: ERROR: Record 116103, Read name HISEQ01:267:H77T6ADXX:1:1101:19872:3119, Mapped mate should have mate reference name
Last edited by id0; 09-30-2013, 07:31 AM.
Leave a comment:
-
Can you reproduce the problem you described with the downsampled files you provided?
I am getting the following Picard exception with them:
Exception in thread "main" net.sf.picard.PicardException: Discordant contig lengths: read chr1 LN=195471971, ref chr1 LN=249250621
Leave a comment:
-
Originally posted by offspring View PostUnfortunately I can't reproduce this with the datasets I have available. Since the datasets are probably too large to share, could you run some tests and report the results? The following would be interesting for a start:
Take the read recorded in the Picard exception, e.g. HISEQ01:514:H812AADXX:1:2105:9732:29000 in the example you posted earlier.
Look for the read in both accepted_hits.bam and unfixed unmapped.bam as well as fixed unmapped.bam:
Code:samtools view accepted_hits.bam | grep HISEQ01:514:H812AADXX:1:2105:9732:29000 samtools view unmapped.bam | grep HISEQ01:514:H812AADXX:1:2105:9732:29000 samtools view unmapped_fixup.bam | grep HISEQ01:514:H812AADXX:1:2105:9732:29000
Column 5 in unmapped.bam is 255, but is changed to 0 in unmapped_fixup.bam.
I trimmed my starting FASTQs to just 100,000 reads for testing. The resulting BAMs are less than 10 MBs combined. I posted them here if you want to check for yourself:
(Whoever is reading this thread a few weeks from now, these will probably be broken links. Sorry.)
Leave a comment:
Latest Articles
Collapse
-
by seqadmin
This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.
The Headliner
The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...-
Channel: Articles
03-03-2025, 01:39 PM -
-
by seqadmin
The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...-
Channel: Articles
02-24-2025, 06:31 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, 03-03-2025, 01:15 PM
|
0 responses
181 views
0 likes
|
Last Post
by seqadmin
03-03-2025, 01:15 PM
|
||
Started by seqadmin, 02-28-2025, 12:58 PM
|
0 responses
275 views
0 likes
|
Last Post
by seqadmin
02-28-2025, 12:58 PM
|
||
Started by seqadmin, 02-24-2025, 02:48 PM
|
0 responses
663 views
0 likes
|
Last Post
by seqadmin
02-24-2025, 02:48 PM
|
||
Started by seqadmin, 02-21-2025, 02:46 PM
|
0 responses
269 views
0 likes
|
Last Post
by seqadmin
02-21-2025, 02:46 PM
|
Leave a comment: