Skip to content

Fix dependence on Illumina (only) file name format to determine sample name #341

@AmandaBirmingham

Description

@AmandaBirmingham

AFAIK, this method (metapool.merge_read_counts()) is only being used in the metagenomics, metatranscriptomics, and tellseq notebooks (plus unit tests), and these notebooks are only for use with Illumina sequencing. Still, we should really centralize this logic that digs sample names out of file names rather than implementing it independently in multiple parts of the codebase.

# Parse table to find sample names, and sum forward and rev reads.
for i in counts_df.index:
filename = counts_df.loc[i, sample_column]
match = re.match(r'^(.*)_S\d+_L00\d', filename)
if not match:
raise LookupError(f'id not found in {filename}')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions