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

Calculate MD5 checksums of sequences and compare to DADA2/Deblur seqids #97

Open
lukenoaa opened this issue Mar 15, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@lukenoaa
Copy link
Member

Rule not working properly:

# mac: md5 / linux: md5sum
rule check_repseq_md5:
    input:
        "02-output-{method}/00-table-repseqs/representative_sequences.fasta"
    output:
        "02-output-{method}/00-table-repseqs/representative_sequences_md5_status.txt"
    shell:
        "seq1id=`head -n 1 {input} | sed 's/^>//'`; "
        "seq1md5=`head -n 2 {input} | tail -n 1 | md5 -q`; "
        "echo -n First representative sequence ID..... > {output}; "
        "echo $seq1id >> {output}; "
        "echo -n First representative sequence MD5.... >> {output}; "
        "echo $seq1md5 >> {output}; "
        "if [ '$seq1id' == '$seq1md5' ]; "
        "then echo 'First representative sequence has ID matching MD5 :)'; "
        "else echo 'First representative sequence has ID *not* matching MD5 :('; "
        "fi >> {output}; "
        "seq2id=`tail -n 2 {input} | head -n 1 | sed 's/^>//'`; "
        "seq2md5=`tail -n 1 {input} | md5 -q`; "
        "echo -n Last representative sequence ID..... >> {output}; "
        "echo $seq2id >> {output}; "
        "echo -n Last representative sequence MD5.... >> {output}; "
        "echo $seq2md5 >> {output}; "
        "if [ '$seq2id' == '$seq2md5' ]; "
        "then echo 'Last representative sequence has ID matching MD5 :)'; "
        "else echo 'Last representative sequence has ID *not* matching MD5 :('; "
        "fi >> {output}"
@lukenoaa lukenoaa added the enhancement New feature or request label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant