-
Notifications
You must be signed in to change notification settings - Fork 20
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
Problem creating JOSNL file with newick_to_taxonium #576
Comments
Hi @NicolaDM , if you are supplying metadata we need to know how to match up the metadata to the node names in the tree. This needs you either to have node names in a column called |
Thank you very much Theo, that works! ValueError: Error: The key column 'node' contains non-unique values in the metadata file. Despite the fact that node names are unique in my file. Is it because names are not allowed to be contained in each other (e.g. a node name should not be a prefix of another node name)? |
I really suspect your metadata file does have genuinely duplicated entries in the key column - there isn't any complex logic in the code on prefixes or anything. Feel free to email the file if helpful. |
Hi Nicola, How are you making your TSV? Here I have replaced the tabs with pipes for clarity
You'll see that the first line has 4 pipes (tabs) but the second has 5 pipes (tabs). These should be equal in a normal TSV. As a result, pandas is assuming that |
I see - indeed I carelessly added an extra tab at the end of each non-title row. Thanks, I'll fix it! |
Indeed I confirm this fixed the problem and now it works - thanks again! |
Great! |
Reopening to consider change to avoid the same confusion in future |
Hi, I have a 3M tips tree that seems to large for the browser version of Taxonium, and I am trying to visualize it locally.
I want to visualize mutations on the tree, and for this I have either a nexus tree, or newick+tsv metadata.
This worked fine for 1M trees on the browser version of Taxonium.
However now I have to convert this to jasonl to run the Taxonium desktop app.
However, when I run
newick_to_taxonium -i 3M_tree.tree -m 3M_metaData.tsv -o 3M_tree.jsonl -c mutationsInf,errors,Ns
I get the following error message:
_File "/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py", line 1302, in validate_usecols_names
raise ValueError(
ValueError: Usecols do not match columns, columns expected but not found: ['strain']
Do certain columns have to be present in the metadata file to make this work? My data is from MAPLE, not UShER, so the headings of the metadata file are different, is this an issue?
The text was updated successfully, but these errors were encountered: