adrlar / CanSNPer

A hierarchical genotype classifier of clonal pathogens
GNU General Public License v3.0
9 stars 6 forks source link

Include contig and position in SNP list #28

Open standage opened 4 years ago

standage commented 4 years ago

When I use the --snp_list option, I get a report like this.

#SNP    Derived Ancestral       ft-asmbl.fna
B.1     T       C       T
B.2     T       G       T
B.3     T       C       T
B.4     A       T       T
B.5     T       C       T
B.6     T       C       C
B.7     G       A       A
B.8     T       G       G
B.9     C       T       T

I've been looking at the snp_lister function trying to figure out if there's any convenient way to include the contig ID and position aligned to that SNP.

#SNP    Derived Ancestral       ft-asmbl.fna     QuerySeq        QueryPosition
B.1     T       C       T       contig1 XXX
B.2     T       G       T       contig1 XXX
B.3     T       C       T       contig2 XXX
B.4     A       T       T       contig3 XXX
B.5     T       C       T       contig4 XXX

Would this be possible?

druvus commented 4 years ago

@standage we have moved development to the completely rewritten CanSNPer2 . The data is now seperated to its own repo CanSNPer2-data. We were are currently working on adding Bacillus and Brucella. Would it be possible to move to v2?

standage commented 4 years ago

Thanks for the response. I would be happy to check this out. Looks like it's already Conda-installable: that's a good sign! I will be eagerly awaiting for Bacillus support to be reinstated.

I haven't had a chance to try running CanSNPer2 yet. Does it support the feature I request here? If so, that's wonderful! If not, I will migrate my request from this repo to that one.

Also, if development has indeed moved completely, I would suggest 1) archiving this repo and 2) adding a note so that users know where to look for the latest.

standage commented 4 years ago

I was able to install CanSNPer2 in a new Conda environment, and download the Ft database. But unfortunately I get the following error when I run it on an Ft sample.

$ CanSNPer2 --database francisella_tularensis.db Ft.fna                                              
Run 1 alignments to references using progressiveMauve
Traceback (most recent call last):
  File "/home/standage/anaconda3/envs/cansnper2/lib/python3.7/site-packages/CanSNPer2/modules/CanSNPer2.py", line 379, in run
    final_snp,message,called = self.create_tree(SNPS,self.query_name,called_snps,self.save_tree,min_required_hits=self.min_required_hits,strictness=self.strictness)
  File "/home/standage/anaconda3/envs/cansnper2/lib/python3.7/site-packages/CanSNPer2/modules/CanSNPer2.py", line 218, in create_tree
    final_snp = newickTree.draw_ete3_tree(SNPS,called_snps,save_tree,summary=summary)
  File "/home/standage/anaconda3/envs/cansnper2/lib/python3.7/site-packages/CanSNPer2/modules/NewickTree.py", line 288, in draw_ete3_tree
    nstyle = ete3.NodeStyle()
AttributeError: module 'ete3' has no attribute 'NodeStyle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/standage/anaconda3/envs/cansnper2/bin/CanSNPer2", line 10, in <module>
    sys.exit(main())
  File "/home/standage/anaconda3/envs/cansnper2/lib/python3.7/site-packages/CanSNPer2/CanSNPerTree.py", line 164, in main
    CanSNPer2_obj.run(database=args.database)
  File "/home/standage/anaconda3/envs/cansnper2/lib/python3.7/site-packages/CanSNPer2/modules/CanSNPer2.py", line 407, in run
    raise CanSNPer2Error("A file did not run correctly exit CanSNPer2 (use --keep_going to continue with next file!)")
CanSNPer2.modules.CanSNPer2.CanSNPer2Error: 'A file did not run correctly exit CanSNPer2 (use --keep_going to continue with next file!)'

This looks like a problem with ETE3 and not CanSNPer2, but it seems to be the current answer to the question "would it be possible to move to v2?"

standage commented 4 years ago

I should note that I get the error whether I install ETE3 from bioconda or from the dedicated ETE3 channel. It's possible that it's an issue with the order in which my conda channels are configured, in which case any help you could provide would be appreciated.

druvus commented 4 years ago

I linked this issue to the new repo and assigned it to a developer. Could we continue issue solving over there?

druvus commented 4 years ago

I have now added a note at the top of the README about that development of this project is moving over to CanSNPer2 and we will archive it soon.

druvus commented 4 years ago

@adrlar can you press the archive button?