OSU-SRLab/MANTIS

Do not prefix chromosome names with "chr" per default

Opened this issue · 5 comments

Hi,

I am trying to run MANTIS and I think forcing chromosome names to start with "chr" is not a good idea.

My reference fasta, my bam files and the bed file I generated with RepeatFinder do not have them, so adding them crashes MANTIS.

Quick workaround if anybody has got the same problem

diff --git a/kmer_repeat_counter.py b/kmer_repeat_counter.py
index fc22d02..753b1b3 100755
--- a/kmer_repeat_counter.py
+++ b/kmer_repeat_counter.py
@@ -46,7 +46,8 @@ class MSILocusLoader:
                         locus = MSILocus(line)
                         if locus.chromosome[0:3] != 'chr':
                             # Force-prepend the chr prefix
-                            locus.chromosome = 'chr{0}'.format(locus.chromosome)
+                            #locus.chromosome = 'chr{0}'.format(locus.chromosome)                                                
+                            pass                                                                                                                                                          
                                                                                                                                                                                             
                         # Correct any off-by-one errors that may occur because of                                                                                                           
                         # unstandardized open- and closed-endedness of bed file coordinates.

Thanks for the quick fix. I too use a reference genome that lacks 'chr' for chromosomes (GRCh37).

Thanks for this as well. We will test this before merging.

Hi @rbonneville, this is just a quick workaround for the problem, I do not think this should be merged.

But it would certainly be a good idea to check for matching contig names for bam files, reference and bed file.

Not sure what has changed in the meantime, but the most recent version does not crash anymore.

Probably the chr prefix is now added consistently.

@rbonneville should we close this?

Hi, thanks for developing MANTIS. This problem still seems to exist. MANTIS prepends "chr" to the locus file. However, the reference FASTA file (used to produce the microsates) does not contain "chr" thus, it errors out:

b'[W::fai_get_val] Reference chr1:10485-10499 not found in FASTA file, returning empty sequence\n/usr/bin/MANTIS/kmer_repeat_counter.py