cuhk-haosun / course-MBI6013

Material for Msc. research project MBI6013
GNU General Public License v3.0
0 stars 2 forks source link

Docker #15

Closed XH-BIM closed 1 month ago

XH-BIM commented 2 months ago

docker

Milokita commented 2 months ago

更具体一些会更好

XH-BIM commented 2 months ago

install miniconda

./Miniconda3-4.7.12-Linux-x86_64.sh export PATH="/share/home/grp-sunhao/xuhang/miniconda3/bin:$PATH" source ~/.bashrc

conda create -n ccsmethenv python=3.8 conda activate ccsmethenv git clone https://github.com/PengNi/ccsmeth.git cd ccsmeth python setup.py install

Install necessary packages (bedtools, and pbccs, pbmm2 or minimap2, samtools) in the same environment.

conda install bedtools -c bioconda
conda install pbccs pbmm2 samtools -c bioconda conda install pytorch==2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia

step1 call hifi reads with kinetics if needed

ccsmeth call_hifi --subreads /path/to/subreads.bam \ --threads 10 \ --output /path/to/output.hifi.bam

step2 align hifi reads

ccsmeth align_hifi \ --hifireads hg002.chr20_demo.hifi.bam \ --ref chr20_demo.fa \ --output output.hifi.pbmm2.bam \ --threads 10

output file: output.hifi.pbmm2.bam

step3 call modifications

CUDA_VISIBLE_DEVICES=0 ccsmeth call_mods \ --input output.hifi.pbmm2.bam \ --ref chr20_demo.fa \ --model_file ccsmeth/models/model_ccsmeth_5mCpG_call_mods_attbigru2s_b21.v3.ckpt \ --output output.hifi.pbmm2.call_mods \ --threads 10 --threads_call 2 --model_type attbigru2s \ --mode align

output file: output.hifi.pbmm2.call_mods.modbam.bam

step4 call modification frequency

ccsmeth call_freqb \ --input_bam output.hifi.pbmm2.call_mods.modbam.bam \ --ref chr20_demo.fa \ --output output.hifi.pbmm2.call_mods.modbam.freq \ --threads 10 --sort --bed \ --call_mode aggregate \ --aggre_model ccsmeth/models/model_ccsmeth_5mCpG_aggregate_attbigru_b11.v2p.ckpt

output file: output.hifi.pbmm2.call_mods.modbam.freq.aggregate.all.bed

@Milokita

Milokita commented 2 months ago

最好是开一个新的branch然后 PR