yanglab-computationalgenomics / Starfish

Other
2 stars 2 forks source link

Sequenza CNV format convert to Starfish needed CNV format #3

Open seqyuan opened 2 years ago

seqyuan commented 2 years ago

Followed by the starfish_tutorial.pdf, Sequenza was used to call CNV, here is my commond

sequenza-utils bam2seqz \
    --normal /data1/HepG2_test.rmdup.bam \
    --tumor /data1/HepG2_test.rmdup.bam \
    --normal2 /data1/GM23248.rmdup.bam \
    --fasta /data1/Homo_sapiens.Ensembl.GRCh38.84.fa \
    -gc /data1/hg38.gc50Base.wig.gz \
    --output non_normal_tumor.seqz.gz

sequenza-utils seqz_binning --seqz non_normal_tumor.seqz.gz --window 50 -o non_normal_tumor_bin50.seqz.gz 

I don't find how to convert non_normal_tumor_bin50.seqz.gz format to the Starfish needed CNV format? It seems to needed merge regions.

image

lsbaoouc commented 2 years ago

Hi,

You may want to check the user guide of Sequenza https://cran.r-project.org/web/packages/sequenza/vignettes/sequenza.html. Basically, you need to install the R package "sequenza", and run following commands:

data.file="non_normal_tumor_bin50.seqz.gz" test <- sequenza.extract(data.file) CP <- sequenza.fit(test) sequenza.results(sequenza.extract = test, cp.table = CP, sample.id = "Test", out.dir="TEST")

Then several result files will be generated under the folder "TEST", and the "Test_segments.txt" will be what you need.

Best, Lisui