This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MACS2- struct.error: unpack requires a string argument of length 4
Command line: callpeak -t filtered_H3K9ME3_MEIS1_NATIVE_A10.bam -f BAM -c input_Meis1_native_D02.bam -g mm --broad --broad-cutoff 0.1

ARGUMENTS LIST:
name = NA
format = BAM
ChIP-seq file = ['filtered_H3K9ME3_MEIS1_NATIVE_A10.bam']
control file = ['input_Meis1_native_D02.bam']
effective genome size = 1.87e+09
band width = 300
model fold = [5, 50]
qvalue cutoff for narrow/strong regions = 5.00e-02
qvalue cutoff for broad/weak regions = 1.00e-01
The maximum gap between significant sites is assigned as the read length/tag size.
The minimum length of peaks is assigned as the predicted fragment length "d".
Larger dataset will be scaled towards smaller dataset.
Range for calculating regional lambda is: 1000 bps and 10000 bps
Broad region calling is on
Paired-End mode is off

INFO @ Wed, 08 May 2019 17:48:44: #1 read tag files...
INFO @ Wed, 08 May 2019 17:48:44: #1 read treatment tags...
INFO @ Wed, 08 May 2019 17:48:48: 1000000
INFO @ Wed, 08 May 2019 17:48:52: 2000000
INFO @ Wed, 08 May 2019 17:48:55: 3000000
(...)
INFO @ Wed, 08 May 2019 17:54:03: #1.2 read input tags...
Traceback (most recent call last):
File "/usr/local/bin/macs2", line 622, in 
main()
File "/usr/local/bin/macs2", line 57, in main
run( args )
File "/Library/Python/2.7/site-packages/MACS2/callpeak_cmd.py", line 73, in run
else: (treat, control) = load_tag_files_options (options)
File "/Library/Python/2.7/site-packages/MACS2/callpeak_cmd.py", line 411, in load_tag_files_options
control = options.parser(options.cfile[0], buffer_size=options.buffer_size).build_fwtrack()
File "MACS2/IO/Parser.pyx", line 876, in MACS2.IO.Parser.BAMParser.build_fwtrack (MACS2/IO/Parser.c:13658)
File "MACS2/IO/Parser.pyx", line 889, in MACS2.IO.Parser.BAMParser.build_fwtrack (MACS2/IO/Parser.c:13066)
File "MACS2/IO/Parser.pyx", line 862, in MACS2.IO.Parser.BAMParser.get_references (MACS2/IO/Parser.c:12582)
struct.error: unpack requires a string argument of length 4

Wondering what went wrong in this command?

macs2 chip-seq

I added some highlighting to your post. Please use the code option(10101) from now on. I also shortened the log report a bit (deleted some lines after INFO @ Wed, 08 May 2019 17:48:55: 3000000and added (...) instead) to improve readability.

As for the question, what is the output of samtools quickcheck -qvvv input_Meis1_native_D02.bam and samtools view input_Meis1_native_D02.bam | head? It could be a problem with the control file.

The output of samtools quickcheck -qvvv input_Meis1_native_D02.bam is: verbosity set to 3 checking input_Meis1_native_D02.bam opened input_Meis1_native_D02.bam input_Meis1_native_D02.bam is sequence data input_Meis1_native_D02.bam had no targets in header. input_Meis1_native_D02.bam cannot be checked for EOF block because its filetype does not contain one. input_Meis1_native_D02.bam

and the output of samtools view input_Meis1_native_D02.bam | head is silent.

Looks like you are right on! It is probably a problem with the control file. I was wondering though, what could have gone wrong? The upstream steps are: Illumina seq, alignment using bowtie2, blacklist removal using ENCODE .bed files in bedtools.

Thanks for the help!

Also checked the control file, it turned out to be empty. I think maybe something happened when I was removing the blacklist regions?

Command for removal?

0 answers

No answers yet.

Log in to answer this question.