Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Bioperl

    I have try to use the get_SeqFeatures with the following code, however the output looks like there are some errors, not sure how to fix that, any help? Thanks.

    #!/usr/bin/perl

    use Bio::Perl;
    use Bio::SeqIO;
    #use Bio::Graphics;
    use Bio::SeqFeature::Generic;

    my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
    while (my $seq = $seqio->next_seq()) {
    # $seq is-a Bio::FeatureHolderI, hence:
    my @feas = $seq->get_SeqFeatures();
    # each element is-a Bio::SeqFeatureI
    foreach my $fea (@feas) {
    # do something with the feature objects
    print "$fea\n";
    }


    output

    Bio::SeqFeature::Generic=HASH(0x9f1d1c)
    Bio::SeqFeature::Generic=HASH(0x9f03dc)
    Bio::SeqFeature::Generic=HASH(0x9f0460)
    Bio::SeqFeature::Generic=HASH(0x9f25e0)
    Bio::SeqFeature::Generic=HASH(0x9f583c)
    Bio::SeqFeature::Generic=HASH(0x9f2790)
    Bio::SeqFeature::Generic=HASH(0x9f24d8)
    Bio::SeqFeature::Generic=HASH(0x9f6334)
    Bio::SeqFeature::Generic=HASH(0x9f6610)
    Bio::SeqFeature::Generic=HASH(0x9f5cd4)

  • #2
    this is just how perl works and is not a bug nor specific to bioperl

    you are attempting to print an object to the display

    you need to use one of the methods provided by that object to return something that is human-readable (i.e. a string)

    try using the display_name method
    --
    Jeremy Leipzig
    Bioinformatics Programmer
    --
    My blog
    Twitter

    Comment


    • #3
      Thanks. Do any one knows how to pass the objects from get_SeqFeatures, e.g. CDS/EXONS positions to the Bio::Coordinate::GeneMapper function to get different coordinate value? The doc is not very helpful at all. Thanks a lot

      Comment


      • #4
        From the genemapper documentation it looks like you'll need two things:
        # get a Bio::RangeI representing the start, end and strand of the CDS
        # in chromosomal (or entry) coordinates
        my $cds;

        # get a Bio::Location::Split or an array of Bio::LocationI objects
        # holding the start, end and strand of all the exons in chromosomal
        # (or entry) coordinates
        the latter can be gleaned from the SeqFeature using the Location method, though you might have to put them into an array


        There are pretty good BioPerl mailing lists out there but I suggest you learn more basics about using perl objects before posting questions to one of those.
        --
        Jeremy Leipzig
        Bioinformatics Programmer
        --
        My blog
        Twitter

        Comment


        • #5
          I know the functions, however the documentation is not very clear without a good working example. which site is a better bioperl mailing list?

          Comment


          • #6
            how to I get the value out of this objects

            Comment


            • #7
              look at the methods and find one that returns an integer or a string

              have you read through Beginning Perl for Bioinformatics and Mastering Perl for Bioinformatics?

              I understand your frustration but I would not suggest posting to the bp boards. First familiarize yourself well with perl and then read every post you can about coordinates.

              --
              Jeremy Leipzig
              Bioinformatics Programmer
              --
              My blog
              Twitter

              Comment


              • #8
                Thanks, not have much time with it, would like quick help to move on, however thanks anyway.

                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...
                  Yesterday, 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, Today, 06:57 AM
                0 responses
                9 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 07:17 AM
                0 responses
                14 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 05-02-2024, 08:06 AM
                0 responses
                19 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-30-2024, 12:17 PM
                0 responses
                23 views
                0 likes
                Last Post seqadmin  
                Working...
                X