StringTie用法詳解


StringTie

參考鏈接:

https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual#input

https://www.cnblogs.com/adawong/articles/7977314.html

 

參數簡介

StringTie的基本用法stringtie <aligned_reads.bam> [options]*

其中,aligned_reads.bam 是輸入文件,該輸入文件要求必須按其基因組位置排序, HISAT2的輸出文件則需經過samtools sort生成的bam文件才可當做輸入文件。

其他可選參數:

-h/--help   幫助信息

-v  打開詳細模式,打印程序處理的詳細信息。

-o [<path/>]<out.gtf> 設置StringTie組裝轉錄本的輸出GTF文件的路徑和文件名。此處可指定完整路徑,在這種情況下,將根據需要創建目錄。默認情況下,StringTie將GTF寫入標准輸出。

-p <int>    指定組裝轉錄本的線程數(CPU)。默認值是1

-G <ref_ann.gff>    使用參考注釋基因文件指導組裝過程,格式GTF/GFF3。輸出文件中既包含已知表達的轉錄本,也包含新的轉錄本。選項-B,-b,-e,-C需要此選項(詳情如下)

--rf    鏈特異性建庫方式:fr-firststrand(最常用的是dUTP測序方式,其他有NSR,NNSR).

--fr    鏈特異性建庫方式:fr-secondstrand(如 Ligation,Standard SOLiD).

-l <label>  將<label>設置為輸出轉錄本名稱的前綴。默認:STRG

-f <0.0-1.0>    將預測轉錄本的最低isoform的豐度設定為在給定基因座處組裝的豐度最高的轉錄本的一部分。較低豐度的轉錄物通常是經加工的轉錄本的不完全剪接前體的artifacts。默認值為0.1。

-m <int>    設置預測的轉錄本所允許的最小長度.默認值為200

-A <gene_abund.tab> 輸出基因豐度的文件(制表符分隔格式)

-C <cov_refs.gtf>   輸出所有轉錄本對應的reads覆蓋度的文件,此處的轉錄本是指參考注釋基因文件中提供的轉錄本。(需要參數 -G).

-a <int>    Junctions that don't have spliced reads that align across them with at least this amount of bases on both sides are filtered out. Default: 10

-j <float>  連接點的覆蓋度,即設置至少有這么多的spliced reads 比對到連接點(align across a junction)。 這個數字可以是分數, 因為有些reads可以比對到多個地方。 當一個read 比對到 n 個地方是,則此處連接點的覆蓋度為1/n 。默認值為1。

-t  該參數禁止修剪組裝的轉錄本的末端。默認情況下,StringTie會根據組裝的轉錄本的覆蓋率的突然下降來調整預測的轉錄本的開始和/或停止坐標。

-c <float>  設置預測轉錄本所允許的最小read 覆蓋度。 當一個轉錄本的覆蓋度低於閾值,則輸出文件中不含該轉錄本。默認值為 2.5

-g <int>    設置ga最小值。 Reads that are mapped closer than this distance are merged together in the same processing bundle. Default: 50 (bp)

-B  應用該選項,則會輸出Ballgown輸入表文件(* .ctab),其中包含用-G選項給出的參考轉錄本的覆蓋率數據。(有關這些文件的說明,請參閱Ballgown文檔。)
    如果選項-o 給出輸出轉錄文件的完整路徑,則* .ctab文件與輸出GTF文件在相同的目錄下。
    
-b <path>   指定 *.ctab 文件的輸出路徑, 而非由-o選項指定的目錄。
    注意: 建議在使用-B/-b選項中同時使用-e選項,除非StringTie GTF輸出文件中仍需要新的轉錄本。
    
-e  限制reads比對的處理,僅估計和輸出與用-G選項給出的參考轉錄本匹配的組裝轉錄本。使用該選項,則會跳過處理與參考轉錄本不匹配的組裝轉錄本,這將大大的提升了處理速度。

-M <0.0-1.0>    設定。默認值為0.95.
-x <seqid_list> 忽略所有比對到指定的參考序列上的reads,因此這部分的reads不需要組裝轉錄本。 參數 <seqid_list>可以是單個參考序列名稱 (如: -x chrM),也可以是逗號分隔的序列名稱列表 (如: -x 'chrM,chrX,chrY')。這可以加快StringTie的組裝分析的速度,特別是在排除線粒體基因組的情況下,在某些情況下,線粒體的基因可能具有非常高的覆蓋率,但是它們對於特定的RNA-Seq分析可能不感興趣的。

--merge 轉錄本合並模式。 在合並模式下,StringTie將所有樣品的GTF/GFF文件列表作為輸入,並將這些轉錄本合並/組裝成非冗余的轉錄本集合。這種模式被用於新的差異分析流程中,用以生成一個跨多個RNA-Seq樣品的全局的、統一的轉錄本。
    如果提供了-G選項(參考注釋基因組文件),則StringTie將從輸入的GTF文件中將參考轉錄本組裝到transfrags中。(個人理解:transfrags可能指的是拼接成更大的轉錄本片段,tanscript fragments)

在此模式下可以使用以下附加選項:
-G <guide_gff>  參考注釋基因組文件(GTF/GFF3)
-o <out_gtf>    指定輸出合並的GTF文件的路徑和名稱 (默認值:標准輸出)
-m <min_len>    合並文件中,指定允許最小輸入轉錄本的長度 (默認值: 50)
-c <min_cov>    合並文件中,指定允許最低輸入轉錄本的覆蓋度(默認值: 0)
-F <min_fpkm>   合並文件中,指定允許最低輸入轉錄本的FPKM值 (默認值: 0)
-T <min_tpm>    合並文件中,指定允許最低輸入轉錄本的TPM值  (默認值: 0)
-f <min_iso>    minimum isoform fraction (默認值: 0.01)
-i  合並后,保留含retained introns的轉錄本 (默認值: 除非有強有力的證據,否則不予保留)
-l <label>  輸出轉錄本的名稱前綴 (默認值: MSTRG)

輸入文件

其中,aligned_reads.bam 是輸入文件,該輸入文件要求必須按其基因組位置排序,如TopHat的輸出文件accepted_hits.bam可直接當做輸入文件,而 HISAT2的輸出文件則需經過samtools sort生成的bam文件才可當做輸入文件。

輸入BAM文件中的每個 spliced read 比對(即跨越至少一個連接點的比對)必須包含標簽XS,用以指示測序產生的read是來源於基因組序列上的哪條鏈產生的RNA。由TopHat和 HISAT2 (需參數 --dta,該參數用於發現剪接位點) 產生的比對結果中已經包含標簽XS。但是,有的mapping程序(read mapper)未必含有標簽XS,所以,用戶在進行下一步分析時需要進行檢查。

注意:一定要使用-dta選項來運行HISAT2,否則結果將會受到影響。

作為選項,可以向StringTie提供GTF / GFF3格式的參考注釋基因組文件。在這種情況下,StringTie更喜歡使用注釋文件中的這些“已知”基因,對於那些被表達的基因,它將計算coverage,TPM和FPKM值。它還會產生額外的轉錄本,而注釋文件中並沒有這些轉錄本。請注意,如果不使用選項-e,那么參考轉錄本就需要被reads 完全覆蓋,以便包含在StringTie的輸出中。在這種情況下,其他通過StringTie從數據中組裝的轉錄本,且不在注釋文件中的轉錄本也會輸出。

注意:如果用戶正在分析注釋較好的基因組,例如人類,小鼠或其他模型生物,則強烈建議您提供注釋文件。

輸出文件

主要輸出文件有:

1、 GTF文件: 記錄組裝的轉錄本信息

2、 Tab文件: 記錄基因豐度信息

3、 GTF文件:完全覆蓋與參考注釋基因組文件所匹配的轉錄本信息

4、 *.ctab文件:用於下游Ballgown軟件做差異表達分析的輸入文件

5、 GTF文件:在合並模式下,生成一個合並的GTF文件

GTF文件:記錄組裝的轉錄本信息

  • seqname: 染色體,contig, 或 scaffold

  • source: GTF文件的源文件。

  • feature: 特征類型;如:exon, transcript, mRNA, 5'UTR。

  • start: 開始位置,使用基於1的索引

  • end: 結束位置,使用基於1的索引

  • score: 組裝的轉錄本的可信度分數。目前這個字段沒有被使用,並且如果轉錄本 與a read alignment bundle

    有連接,則StringTie輸出常數值1000。

  • strand: 正向鏈: '+'; 反向鏈: '-'.

  • frame: CDS特征的 Frame or phase 。 StringTie不使用該字段,只記錄一個“.”。

  • attributes:

    • gene_id: A unique identifier for a single gene and its child transcript and exons based on the alignments' file name.
    • transcript_id: A unique identifier for a single transcript and its child exons based on the alignments' file name.
    • exon_number: A unique identifier for a single exon, starting from 1, within a given transcript.
    • reference_id: The transcript_id in the reference annotation (optional) that the instance matched.
    • ref_gene_id: The gene_id in the reference annotation (optional) that the instance matched.
    • ref_gene_name: The gene_name in the reference annotation (optional) that the instance matched.
    • cov: The average per-base coverage for the transcript or exon.
    • FPKM: Fragments per kilobase of transcript per million read pairs. This is the number of pairs of reads aligning to this feature, normalized by the total number of fragments sequenced (in millions) and the length of the transcript (in kilobases).
    • TPM: Transcripts per million. This is the number of transcripts from this particular gene normalized first by gene length, and then by sequencing depth (in millions) in the sample. A detailed explanation and a comparison of TPM and FPKM can be found here, and TPM was defined by B. Li and C. Dewey here.

Tab文件: 記錄基因豐度信息

如果StringTie使用-A <gene_abund.tab>選項運行,則返回包含基因豐度的文件。

  • Column 1 / Gene ID: The gene identifier comes from the reference annotation provided with the -G option. If no reference is provided this field is replaced with the name prefix for output transcripts (-l).
  • Column 2 / Gene Name: This field contains the gene name in the reference annotation provided with the -G option. If no reference is provided this field is populated with '-'.
  • Column 3 / Reference: Name of the reference sequence that was used in the alignment of the reads. Equivalent to the 3rd column in the .SAM alignment.
  • Column 4 / Strand: '+' denotes that the gene is on the forward strand, '-' for the reverse strand.
  • Column 5 / Start: Start position of the gene (1-based index).
  • Column 6 / End: End position of the gene (1-based index).
  • Column 7 / Coverage: Per-base coverage of the gene.
  • Column 8 / FPKM: normalized expression level in FPKM units (see previous section).
  • Column 9 / TPM: normalized expression level in RPM units (see previous section).

GTF文件:完全覆蓋與參考注釋基因組文件所匹配的轉錄本信息

如果StringTie與 -C <cov_refs.gtf> 選項一起運行(需要選項-G

*.ctab文件:用於下游Ballgown軟件做差異表達分析的輸入文件

如果StringTie與-B選項一起運行,它將返回Ballgown輸入文件,包含以下文件:(1) e2t.ctab, (2) e_data.ctab, (3) i2t.ctab, (4) i_data.ctab, and (5) t_data.ctab。

GTF文件:在合並模式下,生成一個合並的GTF文件

如果StringTie使用--merge選項運行,它將多個GTF / GFF文件作為輸入,並將這些轉錄本合並和組裝成非冗余轉錄本集合。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM