Notice
Recent Posts
Recent Comments
Link
관리 메뉴

박사면뭐해

DESeq2를 위해 StringTie 결과 전처리 하는 방법 - prepDE.py 본문

카테고리 없음

DESeq2를 위해 StringTie 결과 전처리 하는 방법 - prepDE.py

박사면뭐해 2021. 4. 25. 12:07

DESeq2는 R의 Bioconductor 패키지로 유전자의 차등발현 분석을 위한 툴입니다.

 

DESeq2는 유전자와 같은 유전체의 특정 부분에 mapping 된 read count matrix를 input으로 받습니다.

 

StringTie는 DESeq2의 input을 만들기 위해 파이썬 코드 prepDE.py를 제공합니다.

(파이썬2: prepDE.py; 파이썬3: prepDE.py3)

 

prepDE.py를 사용하면  (-e 매개변수(parameter)를 사용한) StringTie의 결과 파일(GTF/GFF)에서 직접 read count 정보를 추출할 수 있습니다.

 

이를 사용하기 위해서는 먼저 StringTie 결과 파일들을 아래와 같이 목록 형태의 텍스트 파일(sample_lst.txt)로 만들어야 합니다. [Sample이름] [샘플.gtf의 경로] (※탭으로 구분)

ERR188021 <PATH_TO_ERR188021.gtf>
ERR188023 <PATH_TO_ERR188023.gtf>
ERR188024 <PATH_TO_ERR188024.gtf>
ERR188025 <PATH_TO_ERR188025.gtf>
ERR188027 <PATH_TO_ERR188027.gtf>
ERR188028 <PATH_TO_ERR188028.gtf>
ERR188030 <PATH_TO_ERR188030.gtf>
ERR188033 <PATH_TO_ERR188033.gtf>
ERR188034 <PATH_TO_ERR188034.gtf>
ERR188037 <PATH_TO_ERR188037.gtf>

샘플 목록 파일이 준비되면, prepDE.py를 실행합니다.

 

사용방법: prepDE.py [옵션]

Usage: prepDE.py3 [options]

Generates two CSV files containing the count matrices for genes and
transcripts, using the coverage values found in the output of `stringtie -e`

Options:
  -h, --help            show this help message and exit
  -i INPUT, --input=INPUT, --in=INPUT
                        a folder containing all sample sub-directories, or a
                        text file with sample ID and path to its GTF file on
                        each line [default: ./]
  -g G                  where to output the gene count matrix [default:
                        gene_count_matrix.csv
  -t T                  where to output the transcript count matrix [default:
                        transcript_count_matrix.csv]
  -l LENGTH, --length=LENGTH
                        the average read length [default: 75]
  -p PATTERN, --pattern=PATTERN
                        a regular expression that selects the sample
                        subdirectories
  -c, --cluster         whether to cluster genes that overlap with different
                        gene IDs, ignoring ones with geneID pattern (see
                        below)
  -s STRING, --string=STRING
                        if a different prefix is used for geneIDs assigned by
                        StringTie [default: MSTRG]
  -k KEY, --key=KEY     if clustering, what prefix to use for geneIDs assigned
                        by this script [default: prepG]
  -v                    enable verbose processing
  --legend=LEGEND       if clustering, where to output the legend file mapping
                        transcripts to assigned geneIDs [default: legend.csv]

# prepDE.py3 -i sample_lst.txt

 

실행 결과로 -g, -t 옵션을 설정하지 않은 이상, gene_count_matrix.csv 파일과 transcript_count_matrix.csv 파일을 제공해줍니다.

 

이 두 파일 중 하나를 선택하여 DESeq2 또는 (EdgeR) 분석을 수행할 수 있습니다.

 

출처: ccb.jhu.edu/software/stringtie/index.shtml?t=manual#deseq

 

 

Comments