美文网首页
2020-01-30 【转录组】六、对Counts标准化计数

2020-01-30 【转录组】六、对Counts标准化计数

作者: my_derek | 来源:发表于2020-01-30 03:48 被阅读0次
    install.packages("countToFPKM")
    library(countToFPKM)
    
    file.readcounts <- system.file("extdata", "RNA-seq.read.counts.csv", package="countToFPKM")
    file.annotations <- system.file("extdata", "Biomart.annotations.hg38.txt", package="countToFPKM")
    file.sample.metrics <- system.file("extdata", "RNA-seq.samples.metrics.txt", package="countToFPKM")
    
    # Import the read count matrix data into R.
    counts <- as.matrix(read.csv(file.readcounts))
    
    # Import feature annotations. 
    # Assign feature lenght into a numeric vector.
    gene.annotations <- read.table(file.annotations, sep="\t", header=TRUE)
    featureLength <- gene.annotations$length
    
    # Import sample metrics. 
    # Assign mean fragment length into a numeric vector.
    samples.metrics <- read.table(file.sample.metrics, sep="\t", header=TRUE)
    meanFragmentLength <- samples.metrics$meanFragmentLength
    
    # Return FPKM into a numeric matrix.
    fpkm_matrix <- fpkm (counts, featureLength, meanFragmentLength)
    
    # Plot log10(FPKM+1) heatmap of top 30 highly variable features
    fpkmheatmap(fpkm_matrix, topvar=30, showfeaturenames=TRUE, return_log = TRUE)
    
    屏幕截图 2020-01-30 03.50.23.png heatmap.png

    相关文章

      网友评论

          本文标题:2020-01-30 【转录组】六、对Counts标准化计数

          本文链接:https://www.haomeiwen.com/subject/gytithtx.html