Seq-Gen icon indicating copy to clipboard operation
Seq-Gen copied to clipboard

Error reading tree number 1: Closing bracket missing.

Open lskatz opened this issue 3 years ago • 3 comments

Similar to #9 but I can't solve it with regex. I downloaded the nextstrain tree (Jan 4, 2021) for nCov and wanted to run TreeToReads.py with it (newick attached below). However the seq-gen part gives the closing bracket error. I have tried a variety of things including renaming the taxa and resolving multifurcations

perl -MBio::TreeIO -e '$tree=Bio::TreeIO->new(-file=>"nextstrain_ncov_global_tree.nwk")->next_tree; for($tree->get_nodes){$i++; if($_->is_Leaf){$_->id("TAXON$i");} else {$_->id("");} } print $tree->as_text("newick")."\n";' | gotree resolve > anonymized.nwk

And breaking apart long lines

cat anonymized.nwk | perl -plane 's/(.{50,}?,)/\1\n/g' > tmp.nwk

This is my seq-gen command (and change the stdin parameter accordingly)

seq-gen -l768000 -n1 -mGTR -a5.0 -r0.25,0.82,0.15,0.27,2.99,1.00 -f0.299236590102,0.183687135874,0.196176253934,0.32090002009 -or < tmp.nwk

But nothing seems to help so far. Any ideas?

nextstrain_ncov_global_tree.zip

lskatz avatar Jan 04 '21 18:01 lskatz