Skip to content

BUG: sample_ids are strings for partitioning#398

Open
cherman2 wants to merge 2 commits into
qiime2:devfrom
cherman2:no_mag_manifest
Open

BUG: sample_ids are strings for partitioning#398
cherman2 wants to merge 2 commits into
qiime2:devfrom
cherman2:no_mag_manifest

Conversation

@cherman2

@cherman2 cherman2 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Enforces that sample id's are treated like strings when filtering manifests during partitioning.

a forum post found that if the id's are all numeric, this line filters them out and then they get a rachis.core.exceptions.ValidationError: /tmp/qiime2/user/tmp/rachis-OutPath-ih9wwzbg/MANIFEST is not a(n) MultiMAGManifestFormat file: No sample records found in manifest, only observed comments, blank lines, and/or a header row.

https://forum.qiime2.org/t/evaluate-bins-with-busco-in-moshpit-tutorial-4-1-6-section/34073/16

I am using this PR as a "Issue placeholder". This code change fixes the issues but I am open to alternative solutions

AI Disclosure

  • NO AI USED.
  • AI USED.

AI Usage Details

@cherman2 cherman2 changed the title ids are always strings BUG: sample_ids are strings for partitioning Jun 30, 2026
manifest = pd.read_csv(mags.path / "MANIFEST", index_col=None)
manifest = manifest[manifest["sample-id"].isin(all_samples)]
manifest = \
manifest[manifest["sample-id"].astype("string").isin(all_samples)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We might be able to coerce first (I think all of these columns are strings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants