Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • esembl compara perl api help needed!

    Hi everyone,

    I'm trying to work with the ensembl perl api, but seem to be unable to do what I want. API -> http://www.ensembl.org/info/data/api.html

    What I want is this:
    I have a set of genomic positions from snp-calling. For each of the positions I want to know how conserved these single positions are compared to/in other species. So I figured I use the Compara API, which contains whole genome alignments, and some of the code here: http://www.ensembl.org/info/docs/api..._tutorial.html So basically I am looking for something like:

    $bases_for_pos_1 = $alignment_human2mouse->getBases($human_position1)
    $bases_for_pos_2 = $alignment_human2mouse->getBases($human_position2)
    etc...(simplified, not real compara code)

    The problem:
    I can retrieve a 'GenomicAlignBlock' which contains the position I am looking for, but also a whole lot of surrounding sequence and I wander how I can get just the bases (from human and the other species) at the specific position...? Or even just whether they are equal or not.

    Anyone?

    -Stef

  • #2
    You may be best posting on the ensembl-dev mailing list, but here is a guesstimate;

    First you need to restrict the Bio::EnsEMBL::Compara::GenomicAlignBlock to the region that you are interested in, using the restrict_between_reference_positions method (see http://www.ensembl.org/info/docs/Pdo...ock.html#POD31)

    You can then call the slice method on the returned GenomicAlignBlock to return the genomic region of the reference. The returned Bio::EnsEMBL::Slice has a seq method to pull the sequence. The non-reference(s) can be accessed in a similar way.

    Comment


    • #3
      Originally posted by whsqwghlm View Post
      using the restrict_between_reference_positions method
      Thank you! Works like a charm. Although I still don't see why they didn't include a method to directly pull one base-pair from the alignment, it seems so useful to me But anyhow my code is a little less long and more straight forward now.

      You can then call the slice method on the returned GenomicAlignBlock to return the genomic region of the reference
      This is not even needed, there is a method "alignment_strings" that returns the sequences (in my case 1 letter long) as an array of strings directly.

      thanks again!

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Recent Advances in Sequencing Analysis Tools
        by seqadmin


        The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
        05-06-2024, 07:48 AM
      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 06:35 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-09-2024, 02:46 PM
      0 responses
      21 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-07-2024, 06:57 AM
      0 responses
      18 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-06-2024, 07:17 AM
      0 responses
      19 views
      0 likes
      Last Post seqadmin  
      Working...
      X