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

Do not prefix chromosome names with "chr" per default #17

Open
messersc opened this issue Feb 12, 2018 · 5 comments
Open

Do not prefix chromosome names with "chr" per default #17

messersc opened this issue Feb 12, 2018 · 5 comments
Assignees

Comments

@messersc
Copy link
Contributor

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.
@rbonneville rbonneville self-assigned this Feb 13, 2018
@IvantheDugtrio
Copy link

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

@rbonneville
Copy link
Contributor

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

@messersc
Copy link
Contributor Author

messersc commented Mar 6, 2018

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.

@messersc
Copy link
Contributor Author

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?

@seifudd
Copy link

seifudd commented Apr 11, 2022

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

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