STAR
Outputs
#
Find similar titles
- (rev. 3)
- green
Structured data
- Category
- Software
STAR를 이용한 맵핑 결과를 해석하는데 있어서 도움이 될 만한 내용들을 다음과 같이 정리하였다.
Table of Contents
Log files #
Log.out #
프로그램 버전, 파라미터 등 실행과 관련된 로그가 정리된 파일로 troubleshooting이나 debugging시 유용한 정보를 제공한다.
Log.progress.out #
분석이 완료된 reads count 등 진행 상황에 대한 통계값을 제공하며 1분 단위로 갱신된다.
Time Speed Read Read Mapped Mapped Mapped Mapped Unmapped Unmapped Unmapped Unmapped
M/hr number length unique length MMrate multi multi+ MM short other
Aug 25 12:45:37 1.2 115854 200 39.6% 198.6 0.3% 9.1% 14.3% 0.0% 36.9% 0.1%
Aug 25 12:46:38 21.3 2436323 200 39.7% 198.6 0.3% 9.0% 14.2% 0.0% 37.0% 0.1%
Log.final.out #
Log.final.out은 STAR alignment 결과 mapped read count 등 통계값을 제공한다. 특히 각 reads의 맵핑 위치에 따라 다음과 같이 분류하여 해당되는 reads count 정보를 보여준다.
> cat final.out
Started job on | Aug 25 15:28:40
Started mapping on | Aug 25 15:28:42
Finished on | Aug 25 15:58:28
Mapping speed, Million of reads per hour | 97.16
Number of input reads | 48200014
Average input read length | 199
UNIQUE READS:
Uniquely mapped reads number | 27683264
Uniquely mapped reads % | 57.43%
Average mapped length | 198.46
Number of splices: Total | 2368813
Number of splices: Annotated (sjdb) | 1528115
Number of splices: GT/AG | 2318929
Number of splices: GC/AG | 4341
Number of splices: AT/AC | 94
Number of splices: Non-canonical | 45449
Mismatch rate per base, % | 0.29%
Deletion rate per base | 0.01%
Deletion average length | 1.74
Insertion rate per base | 0.02%
Insertion average length | 1.12
MULTI-MAPPING READS:
Number of reads mapped to multiple loci | 4578708
% of reads mapped to multiple loci | 9.50%
Number of reads mapped to too many loci | 9745331
% of reads mapped to too many loci | 20.22%
UNMAPPED READS:
% of reads unmapped: too many mismatches | 0.00%
% of reads unmapped: too short | 12.80%
% of reads unmapped: other | 0.05%
CHIMERIC READS:
Number of chimeric reads | 0
% of chimeric reads | 0.00%
Uniquely mapped reads number #
하나의 위치에 특이적으로 맵핑된 경우를 말한다.
Number of reads mapped to multiple loci #
여러 loci에 맵핑되는 reads이다.
Number of reads mapped to too many loci #
--outFilterMultimapNmax 파라미터 (default = 10)에 의해 설정되는 mapping loci의 최대 허용값을 초과하여 맵핑되는 경우를 말하며 이 경우 unmapped로 filter out된다. 즉 이에 해당되는 reads는 최종 SAM 파일에서는 제외된다.
SAM file #
Alignment 결과 최종적으로 다음 분석을 위해 제공되는 파일로 SAM 또는 BAM format을 갖는다 (--outSAMtype SAM 또는 BAM 선택).
앞서 Log.final.out에서 살펴보았듯 uniquely mapped reads와 reads mapped to multiple loci만 포함되며 multiple loci에 맵핑되는 read의 경우 mapping loci 별 각각의 라인으로 여러 번 출력된다.
HWI-D00574:199:C9J38ANXX:2:2101:16988:12647 256 contig_4 2436215 3 4S42M * 0 0 ACGGAGGGTGAGTCAGGGCCTAAGATCAGGCCGAAAGGCGTAGTCG BCBCBCEGGGGGGGGGGGGGGGGGGEGFFEGGGGGGGFGGGFGDGG NH:i:2 HI:i:1 AS:i:29 nM:i:6
HWI-D00574:199:C9J38ANXX:2:2101:16988:12647 0 contig_808 28208 3 1S45M * 0 0 ACGGAGGGTGAGTCAGGGCCTAAGATCAGGCCGAAAGGCGTAGTCG BCBCBCEGGGGGGGGGGGGGGGGGGEGFFEGGGGGGGFGGGFGDGG NH:i:2 HI:i:2 AS:i:30 nM:i:7
따라서 samtools flagstat으로는 SAM (또는 BAM) 파일로부터 mapping reads count를 얻을 수 없고 multi-hit이 포함된 alignment 개수를 확인할 수 있다. 이때 samtools view에서 적절한 flag를 지정하면 mapped read count를 얻을 수 있다.
# alignments 수 출력
> samtools flagstat star_out.bam
11,485,282 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
11,485,282 + 0 mapped (100.00%:-nan%)
# mapped reads 수 출력
> samtools view -F 0x904 -c star_out.bam
위의 예시에서 사용된 0x904는 read unmapped, not primary alignment, supplementary alignment를 의미하며 -F 파라미터에 의해 이에 해당되지 않는 reads의 수만 계산하여 보여준다 (-c).
이를 이용하여 여러 loci에 맵핑되었더라도 하나의 alignment만 추출하여 새로운 BAM 파일을 형성하는 방법은 다음과 같다.
> samtools view -bF 0x904 -o star_out_map1.bam star_out.bam