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
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM
      • seqadmin
        Techniques and Challenges in Conservation Genomics
        by seqadmin



        The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

        Avian Conservation
        Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
        03-08-2024, 10:41 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 06:37 PM
      0 responses
      8 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 06:07 PM
      0 responses
      8 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-22-2024, 10:03 AM
      0 responses
      49 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-21-2024, 07:32 AM
      0 responses
      67 views
      0 likes
      Last Post seqadmin  
      Working...
      X