cnvkit bgzf_read error 4 after 4 bytes
1
1
Entering edit mode
5.4 years ago
sm.hashemin ▴ 90

Hi, I am running CNVKIT and I am new to it. I was running a batch on two tumor samples with a flat reference.

anaconda3/bin/cnvkit.py batch 1.bam 2.bam -n -t /refseq_exome_genesymbol_headless_CNVkit.csv -f hg19.fasta --access access-5k-mappable.hg19.bed --output-reference my_flat_reference.cnn -d output -p 6

I get

 [E::bgzf_read] Read block operation failed with error 4 after 0 of 4 bytes

but it still continues to run. Is it because my bam files are not bzipped? could the results still be usable?

Thanks a lot in advance! Eric T.

cnvkit bzip samtools • 3.0k views
ADD COMMENT
1
Entering edit mode

what is the output of

file 1.bam 2.bam

should be something like "bam version 1" or " gzip compressed data, extra field"

ADD REPLY
0
Entering edit mode

thanks for you answer. It says gzip compressed data, extra field

ADD REPLY
2
Entering edit mode
5.3 years ago
Eric T. ★ 2.8k

That's odd. CNVkit reads the input BAM files with pysam, which internally uses htslib, the same as samtools. If samtools can read (e.g. index) your BAM files, then they should work fine with CNVkit. I haven't seen that error/warning myself, but if the process continues to run and the outputs from the CNVkit command look reasonable then maybe it's not a problem.

ADD COMMENT
0
Entering edit mode

I am also facing similar issue, I get error/warning as:

[E::bgzf_uncompress] Inflate operation failed: progress temporarily not possible, or in() / out() returned an error
[E::bgzf_read] Read block operation failed with error 1 after 0 of 4 bytes
[E::bgzf_uncompress] Inflate operation failed: progress temporarily not possible, or in() / out() returned an error
[E::bgzf_read] Read block operation failed with error 1 after 0 of 4 bytes

I verified following:

  1. "file 1.bam 2.bam" output was "gzip compressed data, extra field" and I am able to run "samtools view X.bam | tail" without errors.
  2. I recreated my BAMs with samtools 1.10 (which says to solve the problem of any truncated BAM) - however issue persists.

However, CNVkit (v 0.9.6) run was completed and I get the desired output files.

When I tried exactly same data, commands with CNVkit (v 0.9.7), I get above warning as well as CNVkit failed with message:

Segmenting with method 'cbs', significance threshold 1e-06, in 1 processes
Traceback (most recent call last):
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/skgenome/tabio/__init__.py", line 74, in read
    dframe = reader(infile, **kwargs)
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/skgenome/tabio/tab.py", line 17, in read_tab
    dframe = pd.read_csv(infile, sep='\t', dtype={'chromosome': 'str'})
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 686, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 452, in _read
    parser = TextFileReader(fp_or_buf, **kwds)
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 936, in __init__
    self._make_engine(self.engine)
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 1168, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/group/bioinfo/apps/apps/miniconda-4.8.2/envs/cnvkit-0.9.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 1998, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] No such file or directory: '*.cns'

Somehow, (v 0.9.7) unable to generate "cns" files. Do you have any suggestions?

ADD REPLY

Login before adding your answer.

Traffic: 1497 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6