Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieving single bases of the reference genome in R

    Hello,

    Given a chromsome and single-base position for a species, I need to retrieve the called base in the reference genome. I'm looking for an existing way with R/Bioconductor for this.

    I am looking at the bioconductor package rtracklayer, which I know can already retrieve existing annotations (e.g. UCSC) in R-readable format. For now, I have been able to retrieve start and end of transcript and CDS for genes associated with genomic positions, but not single nucleotides at a specific position.

    Otherwise, I'm thinking about reading and retrieving the reference base called directly from the reference genome in fasta (.fa) format.

    Any already existing easy method would be appreciated, however.

  • #2
    What you are after are the BSgenome bioconductor packages, for example using hg18
    Code:
    > library(BSgenome.Hsapiens.UCSC.hg18)
    Loading required package: BSgenome
    Loading required package: IRanges
    
    Attaching package: 'IRanges'
    
    The following object(s) are masked from 'package:base':
    
        cbind, Map, mapply, order, paste, pmax, pmax.int, pmin, pmin.int,
        rbind, rep.int, table
    
    Loading required package: GenomicRanges
    Loading required package: Biostrings
    > getSeq(Hsapiens, "chr1", 10000, 10100)
    [1] "CCCAGGGGCCAGCACTGCTCGAAATGTACAGCATTTCTCTTTGTAACAGGATTATTAGCCTGCTGTGCCCGGGGAAAACATGCAGCACAGTGCATCTCGAG"
    >
    The getSeq() function takes lots of types of arguments for specifying which regions of the genome you want to access eg vectors (as in my example), GRanges, RangedData etc

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Best Practices for Single-Cell Sequencing Analysis
      by seqadmin



      While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
      06-06-2024, 07:15 AM
    • seqadmin
      Latest Developments in Precision Medicine
      by seqadmin



      Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

      Somatic Genomics
      “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
      05-24-2024, 01:16 PM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 06-17-2024, 06:54 AM
    0 responses
    10 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-14-2024, 07:24 AM
    0 responses
    20 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-13-2024, 08:58 AM
    0 responses
    17 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-12-2024, 02:20 PM
    0 responses
    20 views
    0 likes
    Last Post seqadmin  
    Working...
    X