nf-core / sarek

Analysis pipeline to detect germline or somatic variants (pre-processing, variant calling and annotation) from WGS / targeted sequencing
https://nf-co.re/sarek
MIT License
409 stars 417 forks source link

controlfreec with multiple ploidy values results in plotting error #808

Open mjakobs opened 2 years ago

mjakobs commented 2 years ago

Description of the bug

When running nf-core/sarek 3.0.2 with --cf_ploidy "2,3,4" controlfreec runs and produces output but the makeGraph.R script to plot the results crashes, as it expects a single number for the ploidy parameter.

Suggested solution: if --cf_ploidy is used with more than one ploidy option, extract the Output_Ploidy from the tumour_vs_normal.tumor.mpileup.gz_info.txt file (attached) that is produced and pass this to the makeGraph.R script.

Command used and terminal output

run nf-core/sarek -r 3.0.2 -profile singularity  \
 -c nextflow.config \
 --step variant_calling \
 --outdir ./results_3.0.2 \
 -w /scratch/wsspaces/sarek_3.0.2_cfascat-0/work/ \
 --genome GATK.GRCh38 \
 --wes \
 --intervals /data/exome_targets/truseq-dna-exome-targeted-regions-manifest-v1-2_GRCh38_sorted_unique_controlFREEC.bed  \
 --cf_chrom_len /data/reference_genomes/custom_references/custom_Homo_sapiens_assembly38.fasta.fai \
 --tools controlfreec,ascat \
 --cf_contamination_adjustment true \
 --cf_ploidy "2,3,4" \
 --schema_ignore_params cf_ploidy,genomes \
 -resume admiring_noether

Relevant files

command.err.txt tumour_vs_normal_p30.tumor.mpileup.gz_info.txt

System information

FriederikeHanssen commented 2 years ago

Thank you for reporting! will look into a fix