Skip to content

Refactor useq#33

Merged
sawibo merged 45 commits intodevelopfrom
refactor-useq
May 25, 2020
Merged

Refactor useq#33
sawibo merged 45 commits intodevelopfrom
refactor-useq

Conversation

@sawibo
Copy link
Member

@sawibo sawibo commented May 21, 2020

Made all the necessary refactoring changes. Tested in both the NF-IAP and IDT_SingleUMI_Pipeline development workflows.

shell = ['/bin/bash', '-euo', 'pipefail']
input:
tuple sample_id, rg_id, file(fastq: "*")
tuple (sample_id, rg_id, path(fastq))
Copy link
Contributor

@tilschaef tilschaef May 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentations


output:
tuple sample_id, rg_id, file("${rg_id}_sorted.bam"),file("${rg_id}_sorted.bai")
tuple (sample_id, rg_id, path("${rg_id}_sorted.bam"),path("${rg_id}_sorted.bai"), emit: mapped_bams)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentations


input:
tuple sample_id, rg_id, file(fastq: "*")
tuple (sample_id, rg_id, path(fastq) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentations


shell = ['/bin/bash', '-euo', 'pipefail']
input:
tuple sample_id, file(bam), file(bai),file(recal_table), file(interval_file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-2 tabs indentation

tuple (sample_id, path("${sample_id}.${int_tag}.recal.table"), emit: recalibration_tables)

script:
known = params.genome_known_sites ? '--known-sites ' + params.genome_known_sites.join(' --known-sites ') : ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-indentations

tuple (run_id, interval, path(gvcf_chunks), path(gvcf_chunk_idxs), path(interval_file))
output:
tuple run_id, interval, file("${run_id}.${interval}.g.vcf"), file("${run_id}.${interval}.g.vcf.idx"),file(interval_file)
tuple (run_id, interval, path("${run_id}.${interval}.g.vcf"), path("${run_id}.${interval}.g.vcf.idx"),path(interval_file), emit: combined_gvcfs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-spatie na comma

tuple (sample_id, int_tag ,path("${sample_id}.${int_tag}${ext}"), path("${sample_id}.${int_tag}${ext}.idx"), path(interval_file), emit: htcaller_vcfs)

script:
int_tag = interval_file.toRealPath().toString().split("/")[-2]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

// publishDir params.out_dir, mode: 'copy'
input:
tuple sample_id, flowcell, machine, run_nr,file(bam)
tuple (sample_id, flowcell, machine, run_nr,path(bam))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • spatie na comma

tuple (run_id, path("${vcf.baseName}_${db_name}.vcf"), path("${vcf.baseName}_${db_name}.vcf.idx"), emit: annotated_vcfs)

script:
db_file = file(params.genome_variant_annotator_db).getBaseName()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

tuple (run_id, interval, type, path("${run_id}.${interval}.${type}.filtered_variants.vcf"), path("${run_id}.${interval}.${type}.filtered_variants.vcf.idx"), emit: filtered_vcfs)

script:
if (type == 'SNP'){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section


shell = ['/bin/bash', '-euo', 'pipefail']
input:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add title argument

script:

"""
java -Xmx${task.memory.toGiga()-4}g -jar /bin/fgbio-1.1.0.jar --tmp-dir \$PWD CallMolecularConsensusReads \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

@@ -17,6 +18,6 @@ process FilterConsensusReads {
--input $bam \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

script:

"""
java -Xmx${task.memory.toGiga()-4}g -jar /bin/fgbio-1.1.0.jar --tmp-dir \$PWD SortBam \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

shell = ['/bin/bash', '-euo', 'pipefail']

input:
tuple sample_id, flowcell, machine, run_nr, file(bam)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent section

tuple (run_id, path("${vcf.baseName}_${db_name}.vcf"), path("${vcf.baseName}_${db_name}.vcf.idx"), emit: snpsift_annoted_vcfs)

script:
db_file = file(params.genome_snpsift_annotate_db).getBaseName()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

script:

"""
set -o pipefail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent script section

Copy link
Contributor

@tilschaef tilschaef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Indent all sections by 4 spaces (input, output, script).
  • Check spaces after commas for output tuples.
  • Leave space between sections.

Copy link
Contributor

@tilschaef tilschaef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Check indentations. Sometimes they vary between 3 and 4. Looking good so far.

@sawibo sawibo merged commit 6387e87 into develop May 25, 2020
@rernst rernst deleted the refactor-useq branch May 27, 2020 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants