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

qiime2 style metadata import error #46

Open
magicprotoss opened this issue Apr 27, 2024 · 1 comment
Open

qiime2 style metadata import error #46

magicprotoss opened this issue Apr 27, 2024 · 1 comment
Labels
Not a Bug - Solution Provided This behavior is intentional as part of our design. However, we've provided a solution to accommodat

Comments

@magicprotoss
Copy link

When importing a qiime2 style metadata file, the function mStat_import_qiime2_as_data_obj() does not remove the annotation row "q2:types" specifing the data type

data.obj <- mStat_import_qiime2_as_data_obj(
otu_qza = "qiime2_mp_data/rarefied_table.qza",
taxa_qza = "qiime2_mp_data/taxonomy.qza",
sam_tab = "qiime2_mp_data/sample_metadata.tsv",
tree_qza = "qiime2_mp_data/rooted-tree.qza"
)

head(data.obj$meta.dat)
sample.id barcode.sequence body.site year month day subject reported.antibiotic.usage days.since.experiment.start
#q2:types #q2:types categorical categorical numeric numeric numeric categorical categorical numeric
L1S8 L1S8 AGCTGACTAGTC gut 2008 10 28 subject-1 Yes 0
L1S57 L1S57 ACACACTATGGC gut 2009 1 20 subject-1 No 84
L1S76 L1S76 ACTACGTGTGGT gut 2009 2 17 subject-1 No 112
L1S105 L1S105 AGTGCGATGCGT gut 2009 3 17 subject-1 No 140
L2S155 L2S155 ACGATGCGACCA left palm 2009 1 20 subject-1 No 84

@magicprotoss magicprotoss added the bug Something isn't working label Apr 27, 2024
@cafferychen777
Copy link
Owner

Hi @magicprotoss,

Thank you for bringing this to our attention. It seems that the issue you're experiencing is due to the mStat_import_qiime2_as_data_obj() function not stripping the "q2:types" annotation row that specifies data types in the metadata file. This row is necessary for qiime2 but should not be included in the data object created for analysis.

We'll look into updating the function to automatically remove this row during the import process. In the meantime, you can manually adjust the metadata file to remove the "q2:types" row before importing it, or you could use a line of code to exclude it after the data is loaded into R.

We appreciate your feedback and will notify you once we have an update on this issue. If you have any more details or specific examples you could share, that would help us ensure the solution fully addresses your needs.

Best regards,
Caffery Yang

@cafferychen777 cafferychen777 added Not a Bug - Solution Provided This behavior is intentional as part of our design. However, we've provided a solution to accommodat and removed bug Something isn't working labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not a Bug - Solution Provided This behavior is intentional as part of our design. However, we've provided a solution to accommodat
Projects
None yet
Development

No branches or pull requests

2 participants