Error while running sequenza

273 views
Skip to first unread message

satishkumar Ranganathan Ganakammal

unread,
Dec 12, 2023, 12:10:40 PM12/12/23
to Sequenza User Group
Hello,

I am trying to generated CNV and purity report for my data. Below is the command I am running :

#!/usr/bin/env Rscript

library(sequenza)

setwd('/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/')

data.file <- "/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/Test_binned.seqz.gz"

test <- sequenza.extract(data.file, verbose = FALSE)

CP <- sequenza.fit(test

sequenza.results(sequenza.extract = test,

    cp.table = CP, sample.id = "sample1_sample2"

    out.dir="/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/Test")

Error:

$head test_N.out

Error in data.frame(chrom, pos, wins.data, stringsAsFactors = FALSE) : 

  arguments imply differing number of rows: 1, 0

In addition: There were 50 or more warnings (use warnings() to see the first 50)

Error in data.frame(chrom, pos, wins.data, stringsAsFactors = FALSE) : 

  arguments imply differing number of rows: 302, 0

In addition: Warning messages:

1: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  :

  Selecting bandwidth *not* using 'weights'


$tail test_N.out

Warning message:

In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  :

  Selecting bandwidth *not* using 'weights'

Error: unexpected symbol in:

"CP <- sequenza.fit(test

sequenza.results"

Execution halted

It would be great if you can help me to understand and troubleshoot this error.

Thanks,

Satish

satishkumar Ranganathan Ganakammal

unread,
Dec 12, 2023, 12:22:45 PM12/12/23
to Sequenza User Group

I performed the following setps:

 

  1. Ran sequenza-utils bam2seqz, to convert normal and tumor bam to .seqz file
  2. Ran sequenza-utils seqz_binning to generate binned.seqz.gz
  3. Using R script to generate CNV and purity stats:

#!/usr/bin/env Rscript

library(sequenza)

setwd('/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/')

data.file <- "/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/Test_binned.seqz.gz"

data.file

test <- sequenza.extract(data.file, verbose = FALSE)

CP <- sequenza.fit(test

sequenza.results(sequenza.extract = test,

    cp.table = CP, sample.id = "Testsample",

    out.dir="/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/Test ")

 

I get the error below:

$ head test_N.out

nohup: ignoring input

[1] "/mnt/nas-ngs-storage-1/scratch/purity/Test/Variants/sequenza/42-06300_42-06424_A021_binned.seqz.gz"

Error in data.frame(chrom, pos, wins.data, stringsAsFactors = FALSE) : 

  arguments imply differing number of rows: 1, 0

In addition: There were 50 or more warnings (use warnings() to see the first 50)

Error in data.frame(chrom, pos, wins.data, stringsAsFactors = FALSE) : 

  arguments imply differing number of rows: 302, 0

In addition: Warning messages:

1: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  :

  Selecting bandwidth *not* using 'weights'

 

$tail test_N.out

3: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  :

  Selecting bandwidth *not* using 'weights'

4: In numericChrom(chrom) : NAs introduced by coercion

Francesco Favero

unread,
Dec 12, 2023, 5:03:17 PM12/12/23
to Sequenza User Group
I never had this type of error, can you perform the analysis in the R console step by step instead of with the R script?

I think it’s a copy paste issue, but you are missing a ) at the end of the sequenza.fit step

Best

Francesco

satishkumar Ranganathan Ganakammal

unread,
Dec 13, 2023, 9:39:36 AM12/13/23
to Sequenza User Group
Thank you for the response.

I was correct the code and was able to run it successfully. It output a bunch of files. On your tool's github I am not seeing where can I find information of tumor purity?  Can you help me with this.

Thanks again.
Satish 

Xiaoyan Luo

unread,
Dec 24, 2023, 5:07:38 AM12/24/23
to Sequenza User Group
Hello,
I am also trying to generated CNV and purity report for my data. Below is the command I am running :
library(sequenza)
library(copynumber)
data.file<-"/project/luoxy/HCC/test_mapping_fastp/sequenza/DT09_01.small.seqz.gz"
test<-sequenza.extract(data.file,verbose=FALSE,assembly = "hg38",parallel=5)

> test<-sequenza.extract(data.file,verbose=FALSE,assembly = "hg38",parallel=5)

There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
2: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
3: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
4: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
5: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
6: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
7: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
8: In density.default(c(Bf, Af), weight = c(good.reads, good.reads)/(2 *  ... :

  Selecting bandwidth *not* using 'weights'
I don't have errors , but I have the same warnings. I want to understand these warnings , it will be great help if you give me some advice.
Thanks,
Xiaoyan
Reply all
Reply to author
Forward
0 new messages