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

index of change_id_to_name_fasta.py out of range #33

Open
Cactusolo opened this issue May 2, 2019 · 2 comments
Open

index of change_id_to_name_fasta.py out of range #33

Cactusolo opened this issue May 2, 2019 · 2 comments

Comments

@Cactusolo
Copy link

Hi I think the line 14 in change_id_to_name_fasta.py
has to be:
idn[spls[0]] = spls[1]
rather than:
idn[spls[3]] = spls[4]

Since the tutorial said:

change_id_to_name_fasta.py This will allow you to change names in a user input fasta file with a list of given names. The input is a tab delimited file containing the current names in the first column and the names to be replaced with in the second.
python change_id_to_name_fasta.py Table.tsv InputFasta.fa OutputFile

That means the table should only has two columns: old name spls[0] and new name to replace spls[1]

Pardon me if I misinterpret it :0

Miao

@blackrim
Copy link
Member

Hm, that may be the case but do you have an example that I can check?.

@josephwb
Copy link
Member

I think this is fine. The (tsv) table in question is that produced by setup_clade.py (with a name like TAXON_NCBIID.table), and has 7 columns. The columns spls[3] and spls[4] represent the sequence ID and species common name, respectively.

The related file, change_ncbi_to_name_fasta.py, uses different columns from the same table; it converts from the NCBI species ID (spls[1]) to the common name.

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

3 participants