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

rename sample ids #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ekopylova
Copy link
Collaborator

Script renames sample IDs in mapping file and BIOM table.

qiime_mapping_header = line
continue
# use filename as key
key = line[3]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a bit fragile. What about using pandas to parse the table and pull out the column of interest?

import pandas as pd

table = pd.read_csv(qiime_mapping_file_fp, sep='\t', dtype=object)
table.set_index('#SampleID', inplace=True)

...that will trigger changes in the below code but I think the result will be better

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

Successfully merging this pull request may close these issues.

2 participants