Closed mictadlo closed 5 years ago
I also encountered the same problem, I found that sample.clean.sam(generated by filterBAM_forHiC.pl ) is an empty file. I wonder this is caused by my alignments with HiC_pro (bowtie2).
There are some parameters to filter bam file, next if($mapq<30);
next if(!(defined $NM) or $NM>5);
next if(!(defined $XM) or $XM>3);
next if(!(defined $XO) or $XO>2);
next if(!(defined $XG) or $XG>2);
next if(/XA:/);
if i masked the second parameters (XT Type: Unique/Repeat/N/Mate-sw), it can work. I don't know which parameter in the bowtie2 result corresponds to this parameter.
As @rapaJiahe mentioned, filterBAM_forHiC.pl only works for bam files generated by bwa aln. We found that filtering the low-quality mapping results was useful for plant genome, but this is not necessary if you are working on a simple genome.
dear developers,
I am facing with the same situation. But I use ALLHiC_pip.sh witout the bowtie2. How to deal with this error?
the command line was
ALLHiC_pip.sh -r flye_consensus3.fasta -1 Fol007.L350_FDHC220076473-1a_1.fq.clean.gz -2 Fol007.L350_FDHC220076473-1a_1.fq.clean.gz -k 15 -e HindIII -t 128 -b 50k
the error info was as follow
(allhic) mals@bioinformatics-07:~/data/Fol_genome/assembly/HiC/flye/Hind3$ ALLHiC_partition -r seq.HiCcorrected.fasta -e AAGCTT -k 15 -b sample.unique.REduced.paired_only.bam Extract function: calculate an empirical distribution of Hi-C link size based on intra-contig links CMD: allhic extract sample.unique.REduced.paired_only.bam seq.HiCcorrected.fasta --RE AAGCTT 09:20:06 writeRE | NOTICE RE counts in 44 contigs (total: 26376, avg 1 per 2205 bp) written to
sample.unique.REduced.paired_only.counts_AAGCTT.txt
09:20:06 extractContigLinks | NOTICE Parse bamfilesample.unique.REduced.paired_only.bam
09:20:24 extractContigLinks | NOTICE Extracted 0 intra-contig link groups (total = 0) 09:20:24 extractContigLinks | NOTICE Extracted 1 inter-contig groups tosample.unique.REduced.paired_only.clm
(total = 0, maxLinks = 1, minLinks = 3) panic: runtime error: index out of range [256] with length 256
goroutine 1 [running]:
github.com/tanghaibao/allhic.(LinkDensityModel).countBinDensities(0xc00043c150, 0xc0003d8000, 0x2c, 0x40)
/Users/bao/go/src/github.com/tanghaibao/allhic/model.go:149 +0x5a9
github.com/tanghaibao/allhic.(Extracter).makeModel(0xc0005a1cc0, 0xc0000291c0, 0x32)
/Users/bao/go/src/github.com/tanghaibao/allhic/extract.go:164 +0x2ad
github.com/tanghaibao/allhic.(Extracter).Run(0xc0005a1cc0)
/Users/bao/go/src/github.com/tanghaibao/allhic/extract.go:148 +0xaf
github.com/tanghaibao/allhic.init.1.func1(0xc000634500, 0xc0005cc500, 0x2, 0x4)
/Users/bao/go/src/github.com/tanghaibao/allhic/allhic.go:69 +0xc8
github.com/spf13/cobra.(Command).execute(0xc000634500, 0xc0005cc4c0, 0x4, 0x4, 0xc000634500, 0xc0005cc4c0)
/Users/bao/go/src/github.com/spf13/cobra/command.go:833 +0x2aa
github.com/spf13/cobra.(Command).ExecuteC(0xe581e0, 0x1, 0x1, 0xaf9de0)
/Users/bao/go/src/github.com/spf13/cobra/command.go:917 +0x2fb
github.com/spf13/cobra.(Command).Execute(...)
/Users/bao/go/src/github.com/spf13/cobra/command.go:867
github.com/tanghaibao/allhic.Execute(...)
/Users/bao/go/src/github.com/tanghaibao/allhic/allhic.go:40
main.main()
/Users/bao/code/allhic/cmd/main.go:19 +0x6e
Partition contigs based on prunning bam file
CMD: allhic partition sample.unique.REduced.paired_only.counts_AAGCTT.txt sample.unique.REduced.paired_only.pairs.txt 15 --minREs 25
09:20:24 ReadCSVLines | NOTICE Parse csvfile sample.unique.REduced.paired_only.counts_AAGCTT.txt
09:20:24 readRE | NOTICE Loaded 44 contig RE lengths for normalization from sample.unique.REduced.paired_only.counts_AAGCTT.txt
09:20:24 skipContigsWithFewREs | NOTICE skipContigsWithFewREs with MinREs = 25 (RE = only.counts)
Contig #16 (contig_30_pilon_pilon_pilon) has 11 RE sites -> MARKED SHORT
Contig #18 (contig_32_pilon_pilon_pilon) has 7 RE sites -> MARKED SHORT
Contig #21 (contig_36_pilon_pilon_pilon) has 16 RE sites -> MARKED SHORT
Contig #23 (contig_39_pilon_pilon_pilon) has 8 RE sites -> MARKED SHORT
Contig #26 (contig_41_pilon_pilon_pilon) has 20 RE sites -> MARKED SHORT
Contig #27 (contig_43_pilon_pilon_pilon) has 8 RE sites -> MARKED SHORT
Contig #28 (contig_44_pilon_pilon_pilon) has 11 RE sites -> MARKED SHORT
Contig #38 (contig_62_pilon_pilon_pilon) has 5 RE sites -> MARKED SHORT
09:20:24 skipContigsWithFewREs | NOTICE Marked 8 contigs (avg 10.8 RE sites, len 29718) since they contain too few REs (MinREs = 25)
09:20:24 ReadCSVLines | NOTICE Parse csvfile sample.unique.REduced.paired_only.pairs.txt
09:20:24 mustOpen | CRITIC open sample.unique.REduced.paired_only.pairs.txt: no such file or directory
Sorry, I just found it was a closed issue. So I mentioned you here again. @tangerzhang
Hi~, @xizhesun
The error may be caused by the empty of sample.unique.REduced.paired_only.bam
. Please check and provide a full report of ALLHiC_pipeline.sh
.
Thanks for the reply. I'm sure the "sample.unique.REduced.paired_only.bam" file is not empty. We have successfully run it on another computer using ALLHiC_pipeline.sh. I think it 's up to the verson of samtools /bwa. I will check it soon.
I don't know what happened. I have solved the problem after I scroll back to the old version. git checkout 2927a855b5d0e7d00f2cfc66627fe53b6b45aa64
Hi, I got
panic: runtime error: index out of range
when I ran ALLHiC scriptssh allhic_pbs.sh QMg_NbQ4P_RN.fasta 38 GATC
:Here is the logs:
What did I miss?
Thank you in advance,
Michal