Method for rescuing collapsed contigs.
- install
collapse_rescue
git clone https://github.com/wangyibin/collapse_rescue.git cd collapse_rescue chmod +x bin/* pip install -r requirements.txt
- configure
vim ~/.bash_profile
export PATH=$HOME/software/collapse_rescue/bin:$PATH export PATH=$HOME/software/ALLHiC_adjuster/bin:$PATH export PATH=$HOME/software/ALLHiC/bin:$PATH export PATH=$HOME/software/popCNV/bin:$PATH
-
python packages
- rich
- joblib
- numpy
- pandas
- pyfaidx
- pytools
-
softwares
- calculate the copy number of each contig using
popCNV
Alignment must use contig-level assembly as reference.mkdir read_depth && cd read_depth mosdepth -t 10 -b 1000 LAp LAp.contig.bam cd .. popCNV -g LAp.contig.fasta -s 1000 -r read_depth/ -b bamfile/ -l contig.bed -w wrk_dir --group group.list --sample sample.list --wild 0 -t 10
- rescue
agp2cluster.py LAp.agp > LAp.clusters.txt dup_collapsed_contigs.py Allele.ctg.table 06.genes.round.cn LAp.clusters.txt 8 -o output
Allele.ctg.table
generated fromALLHiC
06.genes.round.cn
generated frompopCNV
- optimize
convert_agp_to_tour.py LAp.agp tour dup_collapsed_optimize.py collapsed.rescued.txt LAp.pairs.txt LAp.clm tour -o new_tour > collapsed.optimize.txt
LAp.pairs.txt
andLAp.clm
were generated fromallhic extract
- build
Results are the
dup_collapsed_fasta.py collapsed.optimize.txt LAp.contig.fasta > contig.dup.fasta cd new_tour ALLHiC_build contig.dup.fasta
groups.agp
andgroups.asm.fasta
.
Sequences ID with_d
are the collapsed contigs.