Step 6B in the RNA-seq variant calling pipeline work-through uses the DockerHub container cbcrg/callings-with-gatk:latest
. This image exists, but it does not contain the executable script gghist.R
, which is used in the process script. Thus the workflow fails.
Code
|
process prepare_vcf_for_ase { |
|
container 'cbcrg/callings-with-gatk:latest' |
|
tag "${sampleId}" |
|
publishDir "${params.results}/${sampleId}" |
|
|
|
input: |
|
tuple val(sampleId), |
|
path('final.vcf'), |
|
path('commonSNPs.diff.sites_in_files') |
|
|
|
output: |
|
tuple val(sampleId), path('known_snps.vcf'), emit: vcf_for_ASE |
|
path 'AF.histogram.pdf' , emit: gghist_pdfs |
|
|
|
script: |
|
''' |
|
awk 'BEGIN{OFS="\t"} $4~/B/{print $1,$2,$3}' commonSNPs.diff.sites_in_files > test.bed |
|
|
|
vcftools --vcf final.vcf --bed test.bed --recode --keep-INFO-all \ |
|
--stdout > known_snps.vcf |
|
|
|
grep -v '#' known_snps.vcf | awk -F '\\t' '{print $10}' \ |
|
| awk -F ':' '{print $2}' | perl -ne 'chomp($_); \ |
|
@v=split(/\\,/,$_); if($v[0]!=0 ||$v[1] !=0)\ |
|
{print $v[1]/($v[1]+$v[0])."\\n"; }' | awk '$1!=1' \ |
|
> AF.4R |
|
|
|
gghist.R -i AF.4R -o AF.histogram.pdf |
|
''' |
|
} |
Documentation (first mention; repeated elsewhere in this file)
|
process prepare_vcf_for_ase { |
|
container 'cbcrg/callings-with-gatk:latest' |
|
tag "${sampleId}" |
|
publishDir "${params.results}/${sampleId}" |
|
|
|
input: |
|
tuple val(sampleId), |
|
path('final.vcf'), |
|
path('commonSNPs.diff.sites_in_files') |
|
|
|
output: |
|
tuple val(sampleId), path('known_snps.vcf'), emit: vcf_for_ASE |
|
path 'AF.histogram.pdf' , emit: gghist_pdfs |
|
|
|
script: |
|
''' |
|
awk 'BEGIN{OFS="\t"} $4~/B/{print $1,$2,$3}' \ |
|
commonSNPs.diff.sites_in_files > test.bed |
|
|
|
vcftools --vcf final.vcf --bed test.bed --recode --keep-INFO-all \ |
|
--stdout > known_snps.vcf |
|
|
|
grep -v '#' known_snps.vcf | awk -F '\\t' '{print $10}' \ |
|
| awk -F ':' '{print $2}' | perl -ne 'chomp($_); \ |
|
@v=split(/\\,/,$_); if($v[0]!=0 ||$v[1] !=0)\ |
|
{print $v[1]/($v[1]+$v[0])."\\n"; }' | awk '$1!=1' \ |
|
>AF.4R |
|
|
|
gghist.R -i AF.4R -o AF.histogram.pdf |
|
''' |
|
} |