NBISweden / aMeta

Ancient microbiome snakemake workflow
MIT License
19 stars 14 forks source link

Erroneous combinations of taxid and refids #61

Closed percyfal closed 2 years ago

percyfal commented 2 years ago

taxid and refids show up in wrong combinations. The culprit is the following code snippet:

for tid in taxid:
        wc = Wildcards(fromdict={"sample": wildcards.sample, "taxid": tid})
        _refid = get_ref_id(wc)
        if _refid is not None:
            refid.append(_refid)
    if len(refid) > 0:
        res = expand(fmt, zip, sample=sample, taxid=taxid, refid=refid)
    return res

In case _refid is None, the taxid and refid lists will be of unequal length, causing erroneous combinations.

percyfal commented 2 years ago

Fixed via #59