zoukankan      html  css  js  c++  java
  • 基因/转录本/任意特征 表达定量工具之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
    

      

      

      

      

      

  • 相关阅读:
    选择正确的API从SQL Server获取XML数据
    XmlTextWriter学习笔记[转]
    简单的在线RSS阅读器[转]
    如何从客户端 JavaScript 调用 .NET Web 服务使用 InternetExplorer 和 MSXML
    用xmlhttp将html的数据打包成multipart/formdata格式,实现异步上传文件功能[转]
    ASP.Net中MD5加密16位32位
    第一个XMLHTTP测试成功![原创]
    php目录操作函数
    原创JS幻灯片效果,超少代码
    PHP MVC设想,MVC框架构思(一)
  • 原文地址:https://www.cnblogs.com/leezx/p/8658926.html
Copyright © 2011-2022 走看看