환경 준비 및 데이터 접근
이 작업은 사전에 패키징된 bioi_t2t_v1.tar 컨테이너 이미지를 사용하여 진행됩니다.
기본 데이터 위치: /home/ATCG03/day3_t2t/T2T/data
0.0 K-mer 분석을 통한 유전자 크기 추정 두 가지 시퀀싱 기술(이중 읽기 및 HiFi) 데이터를 활용해 21개 염기쌍 길이의 k-mer 분석 수행.
workdir=/work/T2T/myt2t
datadir=/work/T2T/data
mkdir -p $workdir/0.kmer
cd $workdir/0.kmer
# 이중 읽기 데이터 압축 해제 스크립트 생성
ls $datadir/illu_*.gz | awk '{print "gzip -dc "$0}' > generate.file
# k-mer 계산 (21개 염기쌍, 1G 메모리 제한)
jellyfish count -t 4 -C -m 21 -s 1G -g generate.file -G 2 -o Kmer_21
# k-mer 통계 출력
jellyfish stats -o Kmer_21.stat Kmer_21
# k-mer 빈도 히스토그램 생성 (최대 1천만 항목)
jellyfish histo -v -t 4 -h 10000000 -o Kmer_21.histo Kmer_21
유전자 크기 예측을 위해 GenomeScope R 스크립트 실행:
genomescope.R -i Kmer_21.histo -o genoscope_out -p 2 -k 21 -m 10000000
0.1 HiFi와 온티 데이터의 별도 어셈블리 후 통합
- HiFi 데이터 기반 어셈블리 (hifiasm 사용)
mkdir -p $workdir/1.1_hifi_assembly_hifiasm
cd $workdir/1.1_hifi_assembly_hifiasm
hifiasm -o hifi.asm -t 8 $datadir/hifi.fastq.gz
# GFA 형식에서 경로 정보 추출하여 FASTA로 변환
awk '/^S/{print ">"$2;print $3}' hifi.asm.bp.p_ctg.gfa > hifi.fa
# 어셈블리 통계 확인
assembly-stats hifi.fa
- 온티(ONT) 데이터 어셈블리 (nextDenovo 사용)
mkdir -p $workdir/1.2_ONT_assembly_nextdenovo
cd $workdir/1.2_ONT_assembly_nextdenovo
find $datadir -name ont.fastq.gz > input.fofn
run.cfg 설정 파일 작성:
[General]
job_type = local
job_prefix = nextDenovo
task = all
rewrite = yes
deltmp = yes
parallel_jobs = 2
input_type = raw
read_type = ont
input_fofn = input.fofn
workdir = out
[correct_option]
read_cutoff = 5k
genome_size = 146m
pa_correction = 4
sort_options = -m 2g -t 5
minimap2_options_raw = -t 5
correction_options = -p 5
[assemble_option]
minimap2_options_cns = -t 5
nextgraphoptions = -a 1
어셈블리 실행:
nextDenovo run.cfg
- 온티 어셈블리 후 보정 (nextPolish)
mkdir -p $workdir/1.3_ONT_polish_nextpolish
cd $workdir/1.3_ONT_polish_nextpolish
ln -s ../1.2_ONT_assembly_nextdenovo/out/03.ctg_graph/nd.asm.fasta contig.fa
# 입력 파일 리스트 생성
find $datadir -name hifi.fastq.gz > hifi.fofn
find $datadir -name ont.fastq.gz > lgs.fofn
find $datadir -name illu_* > sgs.fofn
run.cfg 설정 파일:
[General]
job_type = local
job_prefix = nextPolish
task = best
rewrite = yes
rerun = 3
parallel_jobs = 6
multithread_jobs = 5
genome = contig.fa
genome_size = auto
workdir = ./output
polish_options = -p {multithread_jobs}
[sgs_option]
sgs_fofn = ./sgs.fofn
sgs_options = -max_depth 100 -bwa
[lgs_option]
lgs_fofn = ./lgs.fofn
lgs_options = -min_read_len 1k -max_depth 100
lgs_minimap2_options = -x map-ont -t {multithread_jobs}
[hifi_option]
hifi_fofn = ./hifi.fofn
hifi_options = -min_read_len 1k -max_depth 100
hifi_minimap2_options = -x map-hifi
보정 실행:
nextPolish run.cfg
- 보정 후 어셈블리 통합 HiFi와 온티 어셈블리 결과를 함께 정렬하고 구조적 일관성 검증을 통해 최종 경로 연결. 이후 단일 전체 유전자 배열 생성을 위한 후속 처리 진행 중.