-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from DennisSchmitz/dev
Update Jovian 1.2.02
- Loading branch information
Showing
15 changed files
with
898 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Illumina_ref_CutPrimers | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
- intel | ||
- defaults | ||
dependencies: | ||
- python=3.7 | ||
- pysam==0.16.0.1 | ||
- modin==0.8.3 | ||
- samtools==1.11 | ||
- biopython==1.78 | ||
- bedtools==2.29.2 | ||
- minimap2==2.17 | ||
- mappy==2.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
rule ILM_Ref_QC_clean_data: | ||
input: | ||
rules.RemovePrimers_pt2.output | ||
output: | ||
html = f"{datadir + qc_post}" + "{sample}_fastqc.html", | ||
zip = f"{datadir + qc_post}" + "{sample}_fastqc.zip" | ||
conda: | ||
f"{conda_envs}QC_and_clean.yaml" | ||
log: | ||
f"{logdir}" + "QC_clean_data_{sample}.log" | ||
benchmark: | ||
f"{logdir + bench}" + "QC_clean_data_{sample}.txt" | ||
threads: 6 | ||
shell: | ||
""" | ||
if [ -s "{input}" ] # If file exists and is NOT empty (i.e. filesize > 0) do... | ||
then | ||
fastqc -t 6 --quiet --outdir data/FastQC_posttrim/ {input} > {log} 2>&1 | ||
else | ||
touch {output.html} | ||
touch {output.zip} | ||
fi | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
rule RemovePrimers_pt1: | ||
input: | ||
r1 = rules.Clean_the_data.output.r1, | ||
r2 = rules.Clean_the_data.output.r2, | ||
ur1 = rules.Clean_the_data.output.r1_unpaired, | ||
ur2 = rules.Clean_the_data.output.r2_unpaired, | ||
ref = rules.Illumina_index_reference.output.reference_copy | ||
output: | ||
bam = f"{datadir + cln + prdir}" + "{sample}_sorted.bam", | ||
bai = f"{datadir + cln + prdir}" + "{sample}_sorted.bam.bai" | ||
conda: | ||
f"{conda_envs}Illumina_ref_alignment.yaml" | ||
log: | ||
f"{logdir}" + "Illumina_RemovePrimers_pt1_{sample}.log" | ||
benchmark: | ||
f"{logdir + bench}" + "Illumina_RemovePrimers_pt1_{sample}.txt" | ||
threads: config["threads"]["Illumina_align_to_reference"] | ||
params: | ||
aln_type = config["Illumina_ref"]["Alignment"]["Alignment_type"] | ||
shell: | ||
""" | ||
bowtie2 --time --threads {threads} {params.aln_type} \ | ||
-x {input.ref} \ | ||
-1 {input.r1} \ | ||
-2 {input.r2} \ | ||
-U {input.ur1},{input.ur2} 2> {log} |\ | ||
samtools view -@ {threads} -uS - 2>> {log} |\ | ||
samtools collate -@ {threads} -O - 2>> {log} |\ | ||
samtools fixmate -@ {threads} -m - - 2>> {log} |\ | ||
samtools sort -@ {threads} - -o {output.bam} 2>> {log} | ||
samtools index -@ {threads} {output.bam} >> {log} 2>&1 | ||
""" | ||
|
||
rule RemovePrimers_pt2: | ||
input: | ||
bam = rules.RemovePrimers_pt1.output.bam, | ||
ref = rules.Illumina_index_reference.output.reference_copy, | ||
primers = primerfile | ||
output: f"{datadir + cln + prdir}" + "{sample}.fastq" | ||
conda: | ||
f"{conda_envs}Illumina_ref_CutPrimers.yaml" | ||
log: | ||
f"{logdir}" + "Illumina_RemovePrimers_pt2_{sample}.log" | ||
benchmark: | ||
f"{logdir + bench}" + "Illumina_RemovePrimers_pt2_{sample}.txt" | ||
threads: config["threads"]["Illumina_RemovePrimers"] | ||
params: | ||
primer_status = prstatus | ||
shell: | ||
""" | ||
if [ {params.primer_status} == "SET" ]; then | ||
python bin/scripts/RemoveIlluminaPrimers.py --input {input.bam} --reference {input.ref} --primers {input.primers} --threads {threads} --output {output} | ||
else | ||
bedtools bamtofastq -i {input.bam} -fq {output} | ||
fi | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.