XWangLabTHU / cfDNApipe

cfDNApipe: A comprehensive quality control and analysis pipeline for cell-free DNA high-throughput sequencing data
https://xwanglabthu.github.io/cfDNApipe/
Other
60 stars 31 forks source link

fragprofplot error #5

Closed okokookk closed 2 years ago

okokookk commented 3 years ago

Hi,

This pipeline is helping me so much. I am using this pipeline to analyze Fragmentation Profile Analysis.

CODE

import glob

pipeConfigure2(
    threads=60,
    genome="hg38",
    refdir=r"hg38",
    outdir=r"FPA",
    data="WGS",
    type="paired",
    JavaMem="64G",
    case="cancer",
    ctrl="normal",
    build=True,
)

verbose = False

case_bedgz = glob.glob("/Case/*.bed.gz")
ctrl_bedgz = glob.glob("/Ctrl/*.bed.gz")

#case
switchConfigure("cancer")
case_fragCounter = fpCounter(
    bedgzInput=case_bedgz, upstream=True,
    verbose=verbose, stepNum="case01", processtype=1
)
case_gcCounter = runCounter(
    filetype=0, binlen=5000000, upstream=True, verbose=verbose, stepNum="case02"
)
case_GCCorrect = GCCorrect(
    readupstream=case_fragCounter,
    gcupstream=case_gcCounter,
    readtype=2,
    corrkey="-",
    verbose=verbose,
    stepNum="case03",
)
#ctrl
switchConfigure("normal")
ctrl_fragCounter = fpCounter(
    bedgzInput=ctrl_bedgz, upstream=True,
    verbose=verbose, stepNum="ctrl01", processtype=1
)
ctrl_gcCounter = runCounter(
    filetype=0, binlen=5000000, upstream=True, verbose=verbose, stepNum="ctrl02"
)
ctrl_GCCorrect = GCCorrect(
    readupstream=ctrl_fragCounter,
    gcupstream=ctrl_gcCounter,
    readtype=2,
    corrkey="-",
    verbose=verbose,
    stepNum="ctrl03",
)

switchConfigure("cancer")
res_fragprofplot = fragprofplot(
    caseupstream=case_GCCorrect,
    ctrlupstream=ctrl_GCCorrect,
    stepNum="FP",
)

LOG

Background reference check finished!
Background reference check finished!
Processing /Case/CCP09-B01-DI.bed.gz ...
Processing /Case/CCP03-B01-DI.bed.gz ...
Processing /Case/CCP07-B01-DI.bed.gz ...
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
gcCounter -w 5000000 hg38/hg38.fa > /FPA/cancer/intermediate_result/step_case02_runCounter/hg38.gc.wig
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
Background reference check finished!
Processing /Ctrl/CCP03-B02-DI.bed.gz ...
Processing /Ctrl/CCP09-B02-DI.bed.gz ...
Processing /Ctrl/CCP07-B02-DI.bed.gz ...
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
gcCounter -w 5000000 hg38/hg38.fa > /FPA/normal/intermediate_result/step_ctrl02_runCounter/hg38.gc.wig
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
Start multicore running, master process number: 15
Note: some command line verbose may be blocked, the program will record them in record file.
Subprocesses Start running......
Waiting for all subprocesses done...
All subprocesses done.
Background reference check finished!

Traceback (most recent call last):
  File "/anaconda3/envs/cfDNApipe/lib/python3.6/site-packages/cfDNApipe/cfDNA_utils.py", line 1944, in fragProfileplot
    try:
  File "/anaconda3/envs/cfDNApipe/lib/python3.6/site-packages/cfDNApipe/cfDNA_utils.py", line 1944, in <listcomp>
    try:
TypeError: 'float' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda3/envs/cfDNApipe/lib/python3.6/site-packages/cfDNApipe/Fun_fpplot.py", line 145, in __init__
    self.getOutput("txtOutput"),
  File "/anaconda3/envs/cfDNApipe/lib/python3.6/site-packages/cfDNApipe/cfDNA_utils.py", line 1946, in fragProfileplot
    except TypeError:
cfDNApipe.cfDNA_utils.commonError: Low sequencing depth detected, cannot get valid value for specific genome region.

Can you please check what is wrong?

Thank you

Honchkrow commented 3 years ago

Hello @okokookk ,

The error is cause by the empty signal in larger regions of one sample, but the other sample shows the resonable singal. Therefore, we are working to tackle this problem. The new version od cfDNApipe will release soon.

Thanks for using cfDNApipe.

Wei