基因/轉錄本/任意特征 表達定量工具之featureCounts使用方法 | 參數詳解


featureCounts真的很厲害。

常見的參數(沒什么好說的,畢竟是固定的):

-a
-o
input_file1
-F
-t
-g
-Q
-T

  

關鍵是以下幾個參數怎么設置:

-f # Perform read counting at feature level
-O # Assign reads to all their overlapping meta-features
-M # Multi-mapping reads will also be counted.
--primary # Count primary alignments only.
--ignoreDup # Ignore duplicate reads in read counting.
-s # Perform strand-specific read counting.
-p # If specified, fragments (or templates) will be counted instead of reads.
-B # Only count read pairs that have both ends aligned
-C # Do not count read pairs that have their two ends mapping

  

1. 什么時候需要在feature級別計數?

 

2. 是否要計多重比對?

 

3. 是否該只用最優比對?

 When --primary is specified, the -M option will be ignored, meaning that a primary alignment will always be counted no matter the read is multi-mapped or not. 

4. 是否要忽略重復reads?

 

5. pair-end模式下是否要用fragment計數?

For paired-end reads, you should count read pairs (fragments) rather than reads because counting fragments will give you more accurate counts. There are several reasons why you cannot get the fragment counts by simply dividing the counts you got from counting reads by two.

https://support.bioconductor.org/p/63824/

 

問題:

||    Total fragments : 706143                                                ||
||    Successfully assigned fragments : 71337 (10.1%)                         ||
||    Running time : 0.08 minutes                                             ||  

分配上的reads少得可憐,100%有問題!!!

因為我的unique比對率達到95%以上,怎么會這么少!!!

WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs). 

 

最終查明:是注釋文件的問題!!!正常是70%。

 

如果沒有特別需求,STAR比對的時候就不要sort by coordinate了!!!sort一般都是為了建index

 

可以參考的鏈接:

轉錄組定量-featureCounts

 

不同參數的結果比較:

featureCounts -p -Q 10 -s 0 -T $cpu -a $gtf-o $out_dir/${sName}.all.counts.txt $out_dir/${sName}.hg19Aligned.out.bam
||                 Threads : 1                                                ||
||                   Level : meta-feature level                               ||
||              Paired-end : yes                                              ||
||         Strand specific : no                                               ||
||      Multimapping reads : not counted                                      ||
|| Multi-overlapping reads : not counted                                      ||
||   Min overlapping bases : 1                                                ||
||                                                                            ||
||          Chimeric reads : counted                                          ||
||        Both ends mapped : not required                                     ||


||    Features : 1199851                                                      ||
||    Meta-features : 58302                                                   ||
||    Chromosomes/contigs : 47                                                ||
||                                                                            ||

||    Paired-end reads are included.                                          ||
||    Assign fragments (read pairs) to features...                            ||
||                                                                            ||
||    WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs).                        ||
||                                                                            ||
||    Read re-ordering is performed.                                          ||
||                                                                            ||
||    Total fragments : 419853                                                ||
||    Successfully assigned fragments : 306852 (73.1%)                        ||
||    Running time : 0.06 minutes                                             ||
ssigned        306852
Unassigned_Unmapped     0
Unassigned_MappingQuality       0
Unassigned_Chimera      0
Unassigned_FragmentLength       0
Unassigned_Duplicate    0
Unassigned_MultiMapping 36280
Unassigned_Secondary    0
Unassigned_Nonjunction  0
Unassigned_NoFeatures   56950
Unassigned_Overlapping_Length   0
Unassigned_Ambiguity    19771

  

  

featureCounts -p -Q 10 -M  -s 0 -T $cpu -a $gtf -o $out_dir/${sName}.all.counts.txt2 $out_dir/${sName}.hg19Aligned.out.bam
||                 Threads : 1                                                ||
||                   Level : meta-feature level                               ||
||              Paired-end : yes                                              ||
||         Strand specific : no                                               ||
||      Multimapping reads : counted                                          ||
|| Multi-overlapping reads : not counted                                      ||
||   Min overlapping bases : 1                                                ||
||                                                                            ||
||          Chimeric reads : counted                                          ||
||        Both ends mapped : not required                                     ||
||                                                                            ||
\\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\\
||                                                                            ||

||    Features : 1199851                                                      ||
||    Meta-features : 58302                                                   ||
||    Chromosomes/contigs : 47                                                ||
||                                                                            ||

||    Paired-end reads are included.                                          ||
||    Assign fragments (read pairs) to features...                            ||
||                                                                            ||
||    WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs).                        ||
||                                                                            ||
||    Read re-ordering is performed.                                          ||
||                                                                            ||
||    Total fragments : 419853                                                ||
||    Successfully assigned fragments : 306852 (73.1%)                        ||
||    Running time : 0.05 minutes                                             ||
Assigned        306852
Unassigned_Unmapped     0
Unassigned_MappingQuality       36280
Unassigned_Chimera      0
Unassigned_FragmentLength       0
Unassigned_Duplicate    0
Unassigned_MultiMapping 0
Unassigned_Secondary    0
Unassigned_Nonjunction  0
Unassigned_NoFeatures   56950
Unassigned_Overlapping_Length   0
Unassigned_Ambiguity    19771

    

featureCounts -p -Q 10 -B -s 0 -T $cpu -a $gtf -o $out_dir/${sName}.all.counts.txt3 $out_dir/${sName}.hg19Aligned.out.bam
||                 Threads : 1                                                ||
||                   Level : meta-feature level                               ||
||              Paired-end : yes                                              ||
||         Strand specific : no                                               ||
||      Multimapping reads : not counted                                      ||
|| Multi-overlapping reads : not counted                                      ||
||   Min overlapping bases : 1                                                ||
||                                                                            ||
||          Chimeric reads : counted                                          ||
||        Both ends mapped : required                                         ||
||                                                                            ||
\\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\\
||                                                                            ||

||    Features : 1199851                                                      ||
||    Meta-features : 58302                                                   ||
||    Chromosomes/contigs : 47                                                ||

||    Paired-end reads are included.                                          ||
||    Assign fragments (read pairs) to features...                            ||
||                                                                            ||
||    WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs).                        ||
||                                                                            ||
||    Read re-ordering is performed.                                          ||
||                                                                            ||
||    Total fragments : 419853                                                ||
||    Successfully assigned fragments : 306500 (73.0%)                        ||
||    Running time : 0.05 minutes                                             ||
Assigned        306500
Unassigned_Unmapped     656
Unassigned_MappingQuality       0
Unassigned_Chimera      0
Unassigned_FragmentLength       0
Unassigned_Duplicate    0
Unassigned_MultiMapping 36133
Unassigned_Secondary    0
Unassigned_Nonjunction  0
Unassigned_NoFeatures   56838
Unassigned_Overlapping_Length   0
Unassigned_Ambiguity    19726

    

featureCounts -p -Q 10 --ignoreDup -s 0 -T $cpu -a $gtf -o $out_dir/${sName}.all.counts.txt4 $out_dir/${sName}.hg19Aligned.out.bam
||                 Threads : 1                                                ||
||                   Level : meta-feature level                               ||
||              Paired-end : yes                                              ||
||         Strand specific : no                                               ||
||      Multimapping reads : not counted                                      ||
|| Multi-overlapping reads : not counted                                      ||
||   Min overlapping bases : 1                                                ||
||        Duplicated Reads : ignored                                          ||
||                                                                            ||
||          Chimeric reads : counted                                          ||
||        Both ends mapped : not required                                     ||
||                                                                            ||
\\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\\
||                                                                            ||

||    Features : 1199851                                                      ||
||    Meta-features : 58302                                                   ||
||    Chromosomes/contigs : 47                                                ||
||                                                                            ||

||    Paired-end reads are included.                                          ||
||    Assign fragments (read pairs) to features...                            ||
||                                                                            ||
||    WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs).                        ||
||                                                                            ||
||    Read re-ordering is performed.                                          ||
||                                                                            ||
||    Total fragments : 419853                                                ||
||    Successfully assigned fragments : 306852 (73.1%)                        ||
||    Running time : 0.05 minutes                                             ||
Assigned        306852
Unassigned_Unmapped     0
Unassigned_MappingQuality       0
Unassigned_Chimera      0
Unassigned_FragmentLength       0
Unassigned_Duplicate    0
Unassigned_MultiMapping 36280
Unassigned_Secondary    0
Unassigned_Nonjunction  0
Unassigned_NoFeatures   56950
Unassigned_Overlapping_Length   0
Unassigned_Ambiguity    19771

  

  

  

  

  

 


免責聲明!

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



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