레이블이 STAR인 게시물을 표시합니다. 모든 게시물 표시
레이블이 STAR인 게시물을 표시합니다. 모든 게시물 표시

목요일, 3월 07, 2019

간만에 RNAseq 분석 해보기 -Align-

이번 글은 Align하는 명령어 편! 되겠습니다.

HISAT2
$ ~/hisat2/hisat2 -p num_thread -x /path/to/reference_index --known-splicesite-infile /path/to/splicesite_file --tmo -1 /path/to/pair_1.fastq.gz -2 /path/to/pair_2.fastq.gz | samtools view -Sb - | samtools sort -m memory -@ num_thread - output.sortByCoord
혹은
$~/hisat2/hisat2 -p num_thread -x /path/to/reference_index --known-splicesite-infile /path/to/splicesite_file --dta
-1 /path/to/pair_1.fastq.gz -2 /path/to/pair_2.fastq.gz | samtools view -Sb - | samtools sort -m memory -@ num_thread - output.sortByCoord
혹은
$~/hisat2/hisat2 -p num_thread -x /path/to/reference_index --known-splicesite-infile /path/to/splicesite_file --dta-cufflinks -1 /path/to/pair_1.fastq.gz -2 /path/to/pair_2.fastq.gz | samtools view -Sb - | samtools sort -m memory -@ num_thread - output.sortByCoord


--tmo : Known transcript에 대해서만...
--dta : StringTie를 사용할 경우...
--dta-cufflinks : cufflinks를 사용할 경우...
인것같은 설명이 되어 있는 옵션입니다.
자세한 설명은 메뉴얼 사이트로... (일단 3가지 다 돌리는 걸로)


STAR
$ ~/STAR/STAR --runMode alignReads --genomeDir /path/to/reference_idx --runThreadN num_thread --outSAMtype BAM SortedByCoordinate --outWigType wiggle read1_5p --sjdbGTFfile /path/to/gtf --outBAMsortingThreadN num_thread --readFilesCommand gunzip -c --readFilesIn /path/to/pair_1.fq.gz /path/to/pair_2.fq.gz --outFileNamePrefix /path/to/output/prefix_ --quantMode TranscriptomeSAM --limitBAMsortRAM num_memory

자세한 설명을 원하시면 이곳으로!!


Kallisto

~/kallisto/kallisto quant -i reference_idx -o /path/to/output_dir --bias -t num_thread /path/to/pair_1.fq.gz /path/to/pair_2.fq.gz

Kallisto 메뉴얼은 여기로...


Salmon

~/salmon/salmon quant -i reference_idx -p num_thread -l A -o /path/to/output_dir --validateMappings --seqBias -1 /path/to/pair_1.fq.gz -2 /path/to/pair_2.fq.gz

보다 자세한 설명은 그곳으로..

Align에 필요한 명령어는 이정도면....  현재 명령어에는 각 tools에서 strand specific reads에 대한 옵션은 생략되어 있으니 library를 strand specific으로 했으면 해당 옵션을 활성화 하면됩니다. :) 저는 strand specific한 데이터가 아니라서... ㅎㅎ



출처: JYP


금요일, 3월 01, 2019

간만에 RNAseq 분석 해보기 -Reference편-

Alignment를 수행하기 위해서는 reference가 필요합니다.
모 어떤 alignment 툴에서는 그냥 genome 서열만 있어도 되지만
하이 쓰루풋 시퀀싱 데이터를 다룰 때는 대부분 genome 서열을
나름의 index를 새로 생성하게 됩니다.

앞에서 설치했던 aligner들의 index를 만드는 작업의 로그를 남겨보도록 하겠습니다.

BWA
$ ~/bwa/bwa index -p index_name genome.fa

hisat2
$ ~/hisat2/hisat2_extract_exons.py genome.gtf > genome.exon
$ ~/hisat2/hisat2_extract_splice_sites.py genome.gtf > genome.ss
$ ~/hisat2/hisat2-build -f genome.fa --ss genome.ss --exon genome.exon genome_index_base
STAR
$ ~/STAR/STAR --runThreadN 16 --runMode genomeGenerate --genomeDir genomeOutFolder --genomeFastaFiles genome.fa --genomeSAindexNbases index_base --sjdbGTFfile genome.gtf --sjdbOverhang 99

Kallisto
$ ~/tophat/gtf_to_fasta genome.gtf genome.fa genome.gtf2fa.fa
$ ~/kallisto/kallisto index --index=index_name genome.gtf2fa.fa

Salmon
$ ~/salmon/bin/salmon index -t genome.gtf2fa.fa -i genome_idx --type quasi -k 31



이렇게 하면 각 align tool을 사용하기 위한 reference는 준비되었습니다.


출처: SM

수요일, 2월 27, 2019

간만에 RNAseq 분석 해보기 -설치편-

근 몇년 만인가요..
간만에 RNAseq을 손에 뭍혀봅니다.!! :)

여러가지 Tool을 조합해서 일단 해보고 좋은 놈 골라 쓸 생각이라서
여러 aligner와 abundance tool을 사용할 예정입니다.
그래서 오늘은 서버에 설치된 프로그램 유무 확인 및 업데이트를 해봐야겠습니다. Orz

그래서 오늘 설치편되겠습니다.

오랜만에 작업하는것이라 잘 될지 모르겠습니다. ㅋ

사실 이건 그냥 스킵하셔도 됩니다.
그냥 제 작업 로그 남기는 거거든요 ㅎㅎ :)

bwa (https://github.com/lh3/bwa, 2019.02.27 기준 0.7.17)
$ git clone https://github.com/lh3/bwa.git
$ cd bwa
$ make

hisat2 (https://ccb.jhu.edu/software/hisat2/index.shtml, 2019.02.27 기준 2.1.0)
$ wget http://ccb.jhu.edu/software/hisat2/dl/hisat2-2.1.0-Linux_x86_64.zip
$ unzip isat2-2.1.0-Linux_x86_64.zip

STAR (https://github.com/alexdobin/STAR, 때마침 2019.02.25일에 업데이트 ㄷㄷ)
$ wget https://github.com/alexdobin/STAR/archive/2.7.0e.tar.gz
$ tar -xzf 2.7.0e.tar.gz
$ cd STAR-2.7.0e

StringTie (https://ccb.jhu.edu/software/stringtie/ 2019.02.27 기준 1.3.5)
$ wget http://ccb.jhu.edu/software/stringtie/dl/stringtie-1.3.5.Linux_x86_64.tar.gz
$ tar zxf stringtie-1.3.5.Linux_x86_64.tar.gz
$ cd stringtie-1.3.5.Linux_x86_64

HT-Seq (https://github.com/simon-anders/htseq, 2019.02.27 기준 0.11.0)
$ pip install HTSeq
혹은
$ pip install 'HTSeq==0.11.0'
혹은
$ easy_install 'HTSeq==0.11.0'

잘 안되시면 주위에 리눅스에 HTSeq를 설치할 줄 아는 친구를 찾으십시요! :)

Kallisto (https://pachterlab.github.io/kallisto/, 2019.02.27 기준 0.45.0)
$ wget https://github.com/pachterlab/kallisto/releases/download/v0.45.0/kallisto_linux-v0.45.0.tar.gz
$ tar zxf kallisto_linux-v0.45.0.tar.gz
$ cd kallisto_linux-v0.45.0

Salmon (https://combine-lab.github.io/salmon/, 2019.03.04 기준 0.12.0)
$ wget https://github.com/COMBINE-lab/salmon/releases/download/v0.12.0/salmon-0.12.0_linux_x86_64.tar.gz
$ tar zxf salmon-0.12.0_linux_x86_64.tar.gz
$ cd salmon-0.12.0_linux_x86_64/bin

일단 설치는 여기까지,
옛날에는 컴파일하느라 설치가 반이었는데
요즘은 걍 컴파일이 잘 되어 있어서 ㅎㅎ :)

다음 포스팅은 reference 생성 내용입니다. ㅋ
-별거 없습니다. :)

출처: JYP