Skip to content

Commit

Permalink
remove rst lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed May 13, 2020
1 parent 547d33c commit 5619c3c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,3 @@ repos:
language: node
types: [markdown]
minimum_pre_commit_version: 0.15.0

- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.0
hooks:
- id: rst-linter
description: "rst-linter"
entry: "rst-linter"
36 changes: 24 additions & 12 deletions pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,15 @@ if (!params.skip_reference_download){
reference_genome_gb_ftp (fasta.gz): The reference genome gbff accessed by url via FTP.
Output:
ch_reference_genome_snippy_pairwise (fasta): The compressed reference genome for process snippy_pairwise.
ch_reference_detect_repeats (fasta): The reference genome for process detect_repeats.
ch_reference_genome_detect_low_complexity (fasta): The reference genome for process detect_low_complexity.
ch_reference_gb_snippy_pairwise (gb): The reference genome for process snippy_pairwise.
ch_reference_gb_snippy_multi (gb): The reference genome for process snippy_multi.
ch_reference_genome_snpeff_build_db (gb): The reference genome for process snpeff_build_db
ch_reference_gb_snippy_pairwise (gbff): The reference genome for process snippy_pairwise.
ch_reference_gb_snippy_multi (gbff): The reference genome for process snippy_multi.
ch_reference_genome_snpeff_build_db (gbff): The reference genome for process snpeff_build_db.
Publish:
reference_genome_fna_local (fasta): The locally downloaded reference fasta.
reference_genome_gb_local (fasta): The locally downloaded reference annotations.
reference_genome_gb_local (gbff): The locally downloaded reference annotations.
*/

// Other variables and config
Expand All @@ -376,7 +375,7 @@ if (!params.skip_reference_download){
file reference_genome_gb_local from file(params.reference_genome_gb_ftp)

output:
file "${reference_genome_fna_local.baseName}" into ch_reference_genome_snippy_pairwise, ch_reference_genome_detect_repeats, ch_reference_genome_low_complexity
file "${reference_genome_fna_local.baseName}" into ch_reference_genome_detect_repeats, ch_reference_genome_low_complexity
file "${reference_genome_gb_local.baseName}" into ch_reference_gb_snippy_pairwise, ch_reference_gb_snippy_multi, ch_reference_genome_snpeff_build_db

// Shell script to execute
Expand All @@ -398,16 +397,17 @@ if (!params.skip_reference_download){

process snpeff_build_db{
/*
Build a SnpEff database for the reference genome annotations
Build a SnpEff database for the reference genome annotations.
Input:
reference_genome_gb (gb): The reference genome gbff from process reference_download.
reference_genome_gb (gbff): The reference genome gbff from process reference_download.
Output:
snpEff.config (text): Edited SnpEff configuration file for process snippy_pairwise.
ch_snpeff_config_snippy_pairwise (text): Edited SnpEff configuration file for process snippy_pairwise.
Publish:
snpEff.config (text): Edited SnpEff configuration file.
snpEffectPredictor.bin (gzip text): SnpEff database.
*/
// Other variables and config
Expand All @@ -420,6 +420,7 @@ if (!params.skip_reference_download){

output:
file "snpEff.config" into ch_snpeff_config_snippy_pairwise
file "data/${reference_genome_gb.baseName}/snpEffectPredictor.bin"

// Shell script to execute
script:
Expand All @@ -428,18 +429,29 @@ if (!params.skip_reference_download){
ref=${reference_genome_gb.baseName}
snpeffDir=~/miniconda3/envs/${params.conda_env}/share/snpeff-4.3.1t-3
snpeffData=\$snpeffDir/data;
# Create a new reference data directory
mkdir -p \$snpeffData/\$ref;
# Move over the ref genome genbank annotations and rename
cp ${outdir}/reference_genome/${reference_genome_gb} \$snpeffData/\$ref/genes.gbk;
# Add the new annotation entry to the snpeff config file
configLine="${reference_genome_gb.baseName}.genome : ${reference_genome_gb.baseName}"
# Search for the genome entry in the snpEff config file
if [[ -z `grep "\$configLine" \$snpeffDir/snpEff.config` ]]; then
echo "\$configLine" >> \$snpeffDir/snpEff.config;
fi;
# Copy over snpEff.config just to track it
# Copy over snpEff.config to become an output channel
snpEff build -v -genbank ${reference_genome_gb.baseName}
cp \$snpeffDir/snpEff.config `pwd`
# Move SnpEff database to the correct path
mkdir -p data/
mkdir -p data/${reference_genome_gb.baseName}/
cp \$snpeffData/${reference_genome_gb.baseName}/snpEffectPredictor.bin data/${reference_genome_gb.baseName}/
"""
}

Expand Down Expand Up @@ -557,7 +569,7 @@ if(!params.skip_snippy_pairwise && !params.skip_assembly_download && (params.sql
Input:
ch_assembly_fna_snippy_pairwise (fasta): The genomic assembly from process assembly_download.
ch_reference_gb_snippy_pairwise (gb): The reference annotations from process reference_download.
ch_reference_gb_snippy_pairwise (gbff): The reference annotations from process reference_download.
ch_snpeff_config_snippy_pairwise (text): Edited SnpEff configuration file from process snpeff_build_db.
Output:
Expand Down Expand Up @@ -622,7 +634,7 @@ if(!params.skip_snippy_pairwise && !params.skip_assembly_download && (params.sql
# SnpEff csv Stats
mv \$snippy_snps_csv \$snippy_snps_rename
snpEff -v -csvStats \$snippy_snps_csv ${params.snpeff_db} \$snippy_snps_filt
snpEff -c ${snpeff_config} -v -csvStats \$snippy_snps_csv ${reference_genome_gb.baseName} \$snippy_snps_filt
"""
}

Expand Down

0 comments on commit 5619c3c

Please sign in to comment.