rwdavies / STITCH

STITCH - Sequencing To Imputation Through Constructing Haplotypes
http://www.nature.com/ng/journal/v48/n8/abs/ng.3594.html
GNU General Public License v3.0
76 stars 17 forks source link

error bgzf_read #11

Closed burningangel closed 5 years ago

burningangel commented 5 years ago

Hello!

When I runing stitch, some error is appearing. My script is:

STITCH(
  outputdir = outputdir,
  bamlist=bamlist,
  method = "diploid",
  regionStart = regionStart,
  regionEnd = regionEnd,
  buffer = buffer,
  niterations = niterations,
  chr = chr,
  shuffleHaplotypeIterations = NA,
  refillIterations = NA,
  inputBundleBlockSize = 100,
  posfile = posfile, K = pig_K,
  tempdir = tempdir, nCores = n_cores, nGen = nGen)

and the error is:

Loading required package: parallel
[2018-11-06 14:53:38] Program start
[2018-11-06 14:53:38] Get and validate pos and gen
[2018-11-06 14:53:38] Done get and validate pos and gen
[2018-11-06 14:53:38] Get BAM sample names
[E::bgzf_uncompress] inflate failed: invalid parameter/compression level, or inconsistent stream state
[E::bgzf_uncompress] inflateEnd failed: invalid parameter/compression level, or inconsistent stream state
[E::bgzf_read_block] inflate_block error -1

It looks like the bam files is bad,but I use samtools view can see the record in bam,so I don't konw what happen.Can you help me?Thank you!

rwdavies commented 5 years ago

Hey, thanks for the message. That's a weird error. Is this the latest version of STITCH (release 1.5.3)? Can you run the example test from CFW data with the included BAM files (https://github.com/rwdavies/STITCH#quick-start-on-linux-and-mac)? What version of samtools are you using to read the BAM files? Does it work when you run with just a single BAM file? Can you try recompressing the BAM with a newer version of samtools and see if the problem persists?

burningangel commented 5 years ago

Thank you for you help! I am sorry to reply you so late. I was useed STITCH(1.4) when I asked for help. Now, I am using the latest version of STITCH (release 1.5.3),and it's OK. No errors. Although I don't know what happened before, at least the problem has been solved, I will continue to explore.Thank you!

rwdavies commented 5 years ago

Great! Glad the problem went away