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
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      30 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      32 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      53 views
      0 likes
      Last Post seqadmin  
      Working...
      X