Skip to content

MakeGraph2.0.R #163

@deathstar550

Description

@deathstar550

Hi all,

My nf-core/sarek run was failing in makeGraph2.0.R with a complaint about certain lines in my ratio file not having 12 columns. Turns out the ratio file has a few lines that read as "Pathogenic (nssv579289)" - the space is being interpreted by read.table as a new column.

Suggest patch to line 31:
ratio <-read.table(args[ratioFileInd], header=TRUE);
to
ratio <-read.table(args[ratioFileInd], header=TRUE, sep="\t");

Details below:

Command executed:

  cat $(which makeGraph2.0.R) | R --slave --args  sample89.tumor.mpileup.gz_ratio.txt sample89.tumor.mpileup.gz_BAF.txt

  mv *_BAF.txt.png sample89_BAF.png
  mv *_ratio.txt.log2.png sample89_ratio.log2.png
  mv *_ratio.txt.png sample89_ratio.png

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_TUMOR_ONLY_ALL:BAM_VARIANT_CALLING_TUMOR_ONLY_CONTROLFREEC:MAKEGRAPH2":
      controlfreec: 11.6b
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
    line 224918 did not have 12 elements
  Calls: read.table -> scan
  Execution halted
(base) [ec2-user@ip-172-31-20-221 b158d738818e329f11c7e47dd9eef0]$ awk 'NF != 12' sample89.tumor.mpileup.gz_ratio.txt 
Y	17877785	0.272727	0.554471	1	-1	1	A	-1	 Pathogenic (nssv579289)	0	0
Y	17877835	0.0181818	0.554471	1	-1	1	A	-1	 Pathogenic (nssv579289)	0	0
Y	18028145	0.327273	0.554471	1	-1	1	A	-1	 Pathogenic (nssv579289)	0	0
Y	18028178	0.4	0.554471	1	-1	1	A	-1	 Pathogenic (nssv579289)	0	0
Y	21381697	0.290909	0.554471	1	-1	1	A	-1	 Pathogenic (nssv579289)	0	0
(base) [ec2-user@ip-172-31-20-221 b158d738818e329f11c7e47dd9eef0]$ head -n 1 sample89.tumor.mpileup.gz_ratio.txt 
Chromosome	Start	Ratio	MedianRatio	CopyNumber	BAF	estimatedBAF	Genotype	UncertaintyOfGT	Gene	Subclone_CN	Subclone_Population
(base) [ec2-user@ip-172-31-20-221 b158d738818e329f11c7e47dd9eef0]$ awk 'NF == 12' sample89.tumor.mpileup.gz_ratio.txt | head -n 3
Chromosome	Start	Ratio	MedianRatio	CopyNumber	BAF	estimatedBAF	Genotype	UncertaintyOfGT	Gene	Subclone_CN	Subclone_Population
1	65565	0.0545455	1.23636	2	-1	2	-	-1	1:65564-65573	0	0
1	358067	0.0181818	1.23636	2	-1	2	-	-1	1:358066-358183	0	0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions