c-zhou / yahs

Yet another Hi-C scaffolding tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to display all hic signals

monian1113 opened this issue · comments

Since I am using haplotype resolved contigs, some of which may be highly similar, how can I show the missing signal in such regions as well?

When I set mapq to "-q 0" like I did with 3DNA, it doesn't seem to work. What should I do about it?

1692355276378

This is my command. I don't know if it's correct. If not, how do I change it?

chromap --preset hic -r $contigsFasta -x contigs.index --remove-pcr-duplicates -1 $r1Reads -2 $r2Reads --SAM -o aligned.sam -t 48
samtools view -bh aligned.sam | samtools sort -@ 48 -n > aligned.bam
rm aligned.sam

samtools view -bh -u -F0xF0C -q10 aligned.bam | bedtools bamtobed | awk -v OFS='\t' '{$4=substr($4,1,length($4)-2); print}' > align.bed
yahs -o test_out $contigsFasta align.bed
juicer pre -a -o out_JBAT test_out.bin test_out_scaffolds_final.agp draft.genome.fa.fai 2>tmp_juicer_pre_JBAT.log
cat tmp_juicer_pre_JBAT.log | grep "PRE_C_SIZE" | cut -d' ' -f2- > out_JBAT.chrom.sizes
java -jar -Xmx32G juicer_tools.1.9.9_jcuda.0.8.jar pre out_JBAT.txt out_JBAT.hic.part out_JBAT.chrom.sizes
mv out_JBAT.hic.part out_JBAT.hic

####### change mapq (The result is generated as shown in the image)
samtools view -@ 48 -bh -u -F0xF0C aligned.bam | bedtools bamtobed | awk -v OFS='\t' '{$4=substr($4,1,length($4)-2); print}' > align.bed
yahs -q 0 -o test_out draft.genome.fa align.bed
juicer pre -q 0 -a -o out_JBAT test_out.bin test_out_scaffolds_final.agp draft.genome.fa.fai 2>tmp_juicer_pre_JBAT.log
cat tmp_juicer_pre_JBAT.log | grep "PRE_C_SIZE" | cut -d' ' -f2- > out_JBAT.chrom.sizes
java -jar -Xmx32G juicer_tools.1.9.9_jcuda.0.8.jar pre -q 0 out_JBAT.txt out_JBAT.hic.part out_JBAT.chrom.sizes
mv out_JBAT.hic.part out_JBAT.hic