|
samples=["P10415", "P01308"]
|
|
|
|
rule targets:
|
|
input:
|
|
expand("fasta/{sample}.fasta", sample=samples),
|
|
"fusionFasta/allSequences.fasta",
|
|
"mafft/mafft_res.fasta",
|
|
|
|
|
|
rule loadData:
|
|
output:
|
|
"fasta/{sample}.fasta",
|
|
log:
|
|
stdout = "logs/{sample}_wget.stdout",
|
|
stderr = "logs/{sample}_wget.stderr",
|
|
params:
|
|
dirFasta = "fasta",
|
|
threads: 1
|
|
shell:
|
|
"""
|
|
wget --output-file {log.stderr} \
|
|
--directory-prefix {params.dirFasta} \
|
|
https://www.uniprot.org/uniprot/{wildcards.sample}.fasta > {log.stdout}
|
|
"""
|
|
|
|
|
|
rule fusionFasta:
|
|
input:
|
|
expand("fasta/{sample}.fasta", sample=samples),
|
|
output:
|
|
"fusionFasta/allSequences.fasta",
|
|
log:
|
|
"logs/fusionData.stderr",
|
|
threads: 1
|
|
shell:
|
|
"""
|
|
cat {input} > {output} 2> {log}
|
|
"""
|
|
|
|
|
|
rule mafft:
|
|
input:
|
|
rules.fusionFasta.output,
|
|
output:
|
|
"mafft/mafft_res.fasta",
|
|
log:
|
|
"logs/whichMafft.txt",
|
|
threads: 1
|
|
shell:
|
|
"""
|
|
mafft {input} > {output} 2> {log}
|
|
"""
|