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

alignment import fail #107

Open
LunaSare opened this issue Jun 10, 2020 · 0 comments
Open

alignment import fail #107

LunaSare opened this issue Jun 10, 2020 · 0 comments

Comments

@LunaSare
Copy link
Collaborator

nexus alignments such as https://github.com/McTavishLab/physcraperex/blob/master/data-raw/alignments/Tr5276-M3802.nex
fail to be imported by dendropy.

Issue seems to be originated by a parentheses used at the charset.

Running:

physcraper_run.py -s pg_238 -t tree109 -a physcraperex/data-raw/alignments/Tr5276-M3802.nex -as nexus -o test

Returns:

No config file, using defaults
Configuration Settings
[blast]
Entrez.email = None
e_value_thresh = 1e-05
hitlist_size = 10
location = remote
localblastdb = None
num_threads = 4
delay = 90
[physcraper]
spp_threshold = 5
min_length = 0.8
max_length = 1.2

get_mrca_ott
(v3) MRCA of sampled taxa is Ascomycota
alignment tag is Tr5276-M3802
Traceback (most recent call last):
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/bin/physcraper_run.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/Users/luna/pj_physcraper/physcraper/bin/physcraper_run.py", line 178, in <module>
    configfile = conf)
  File "/Users/luna/pj_physcraper/physcraper/physcraper/opentree_helpers.py", line 281, in scraper_from_opentree
    tree_id=tree_id)
  File "/Users/luna/pj_physcraper/physcraper/physcraper/opentree_helpers.py", line 215, in generate_ATT_from_phylesystem
    return physcraper.aligntreetax.AlignTreeTax(tree = otu_newick, otu_dict =otu_dict, alignment=alnfile, aln_schema = aln_schema, search_taxon=ott_mrca, workdir=workdir, configfile=configfile)
  File "/Users/luna/pj_physcraper/physcraper/physcraper/aligntreetax.py", line 214, in __init__
    self.read_in_aln(alignment, aln_schema)
  File "/Users/luna/pj_physcraper/physcraper/physcraper/aligntreetax.py", line 272, in read_in_aln
    self.aln = DnaCharacterMatrix.get(path=alignment, schema=aln_schema, taxon_namespace = self.tns)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/datamodel/charmatrixmodel.py", line 606, in get
    return cls._get_from(**kwargs)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/datamodel/basemodel.py", line 156, in _get_from
    return cls.get_from_path(src=src, schema=schema, **kwargs)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/datamodel/basemodel.py", line 219, in get_from_path
    **kwargs)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/datamodel/charmatrixmodel.py", line 527, in _parse_and_create_from_stream
    global_annotations_target=None)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/dataio/ioservice.py", line 377, in read_char_matrices
    global_annotations_target=global_annotations_target)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/dataio/nexusreader.py", line 363, in _read
    self._parse_nexus_stream(stream)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/dataio/nexusreader.py", line 583, in _parse_nexus_stream
    self._parse_charset_statement(block_title=block_title, link_title=link_title)
  File "/Users/luna/pj_physcraper/physcraper/venv-physcraper/lib/python3.7/site-packages/dendropy/dataio/nexusreader.py", line 1145, in _parse_charset_statement
    raise self._nexus_error('Expecting "=" after character set name "%s", but instead found "%s"' % (charset_name, token))
dendropy.dataio.nexusreader.NexusReaderError: Error parsing data source 'data-raw/alignments/Tr5276-M3802.nex' on line 915 at column 18: Expecting "=" after character set name "RPB1C2", but instead found "("
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

1 participant