Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doublealice
    Member
    • Feb 2011
    • 24

    #1

    RNA-seq reads counting matrix

    I have a list of reference genome loci coordinates. The short RNA reads were mapped on these loci by bowtie and samtools.

    Instead of simply get the counting number of reads, I hope to generate a matrix like this:
    Code:
    read-id   Loci1     Loci2     Loci3 .....
      1          2            4         0
      2          0            3         4
      3          4            2         5
    ...
    This is just an example showing that read1 aligned two different places in Loci1, 4 different places in loci2, none in loci3.

    I had made loci table in a gff format file and loaded it into R. All reads and alignment information is in bam file.

    I tried two ways to load bam file into R. One is:

    Code:
    reads<-readBamGappedAlignments("myalign_reads.sorted.bam")
    I found the output ignore my reads ID. Only chromosome and positions and other information are available. I need reads ID to count how many different places a read hits within one loci. This seems to be a limitation of the package.

    I also tried another method:
    Code:
    indexBam("myalign_reads.sorted.bam"0
    param<-ScanBamParam()
    reads<-scanBam("myalign_reads.sorted.bam", index="myalign_reads.sorted.bam", param=param)
    This loaded everything and read id was stored in qname. However, I don't know how to perform the further counting to generate the matrix.

    Can you give me any suggestion or idea on how to work on it? I tried my best but due to limit knowledge on R and bioconductor, I have suffered from it for several days.

    I appreciate if anyone can give me some hints or help me work it out. Thanks!

    Alice
  • areyes
    Senior Member
    • Aug 2010
    • 165

    #2
    Sorry, I did not watch your matrix correctly!
    Last edited by areyes; 04-19-2011, 04:03 AM. Reason: mistake

    Comment

    • doublealice
      Member
      • Feb 2011
      • 24

      #3
      I got some progress on this according to the manual from http://manuals.bioinformatics.ucr.edu/home/ht-seq
      on section "Computing Absolute and Relative Overlaps Among Ranges".

      Now, I have a list like this:
      Code:
      readid     loci-id
      1           105
      1            108
      3            114
      3            114
      2            120
      4            123
      3            123
      5            124
      5            125
      5            125
      6            128
      7            128
      6            128
      6            128
      8            128
      ...
      The next work is transform this table into my expected matrix, like:
      Code:
      readid   105 108  114  120  123  124  125  128
      1          1    1
      2                          1
      3                    2             1
      4                                       1
      5                                               1      2
      6                                                        3
      7                                                    1
      8                                                   1
      I don't know how to adjust the table to present it very well here. Anyway, it just shows how many different places a read mapped in a loci.

      To get this matrix also not easy for me. If you know any R function can work on it, please hint. Thank you very much!

      Alice

      =========
      I got it. Using table() can get that matrix.
      Last edited by doublealice; 04-19-2011, 01:04 PM.

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
        by SEQadmin2



        CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

        Despite this, “CRISPR helped turn genome editing from a specialized technique into
        ...
        07-31-2026, 11:01 AM
      • SEQadmin2
        Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
        by SEQadmin2


        Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

        The systematic characterization of the human proteome has
        ...
        07-20-2026, 11:48 AM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        07-09-2026, 11:10 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 08-06-2026, 07:41 AM
      0 responses
      13 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-03-2026, 10:13 AM
      0 responses
      30 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-31-2026, 02:55 AM
      0 responses
      40 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-24-2026, 12:17 PM
      0 responses
      26 views
      0 reactions
      Last Post SEQadmin2  
      Working...