Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Lisa
    Member
    • Jan 2010
    • 10

    pick up some unigene sequences based on a id set

    Hello,

    I am wondering if anyone would like to share some scripts to pick up sequences from fasta format dataset (Unigene) based on a group of id. Thanks a lot.


    Lisa
  • simonandrews
    Simon Andrews
    • May 2009
    • 870

    #2
    Rather than write scripts to do this I'd normally create a local database using the tools in EMBOSS (dbxfasta for a fasta database). Once you've indexed it then you can do batch retrieval of sequences really easily using the seqret program.

    If you'd rather handle this in a script then there are existing indexing schemes available in most languages. For Perl you could use a simple Fasta index via something like Bio::Index::Fasta or go the more formal route to create a Bio:: DB::Flat database

    Comment

    • Lisa
      Member
      • Jan 2010
      • 10

      #3
      Thanks a lot. That would definitely help!
      Lisa

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        If you want to using scripting, for a Python option you might try Biopython's Bio.SeqIO.index() functionality which can be used on a FASTA file or many other formats. See:

        Comment

        • Lisa
          Member
          • Jan 2010
          • 10

          #5
          I downloaded a Unigene set fron NCBI, which is in fasta format as the following,

          >gnl|UG|Les#S50866699 Solanum lycopersicum cDNA, clone: LEFL1002BB12, HTC in leaf /gb=AK319185 /gi=225321
          324 /ug=Les.1 /len=3282
          CAACTCCCAATTC......

          I created a index with the following sample code ( eg, test1.pl) based the data set with the command as

          perl test1.pl myindex Les.seq.uniq

          # Complete code for making an index for several
          # fasta files ----------test1.pl
          use Bio::Index::Fasta;
          use strict;
          my $Index_File_Name = shift;
          my $inx = Bio::Index::Fasta->new(
          '-filename' => $Index_File_Name,
          '-write_flag' => 1);
          $inx->make_index(@ARGV);


          Then, I tried the following sample code ( test2.pl) to retrieve a sequence with the command as

          perl test2.pl myindex UG:Les#S50866699

          # Print out several sequences present in the index
          # in Fasta format --------test2.pl
          use Bio::Index::Fasta;
          use strict;
          my $Index_File_Name = shift;
          my $inx = Bio::Index::Fasta->new('-filename' => $Index_File_Name);
          my $out = Bio::SeqIO->new('-format' => 'Fasta','-fh' => *STDOUT);
          foreach my $id (@ARGV) {
          my $seq = $inx->fetch($id); # Returns Bio::Seq object
          $out->write_seq($seq);
          }

          Finally, I got this error message


          ------------- EXCEPTION -------------
          MSG: Did not provide a valid Bio::PrimarySeqI object
          STACK Bio::SeqIO::fasta::write_seq /usr/lib/perl5/site_perl/5.8.8/Bio/SeqIO/fasta.pm:178
          STACK toplevel retrieve_seq.pl:12
          -------------------------------------


          What is the wrong I made? Please help! Thanks a lot!

          Comment

          • maubp
            Peter (Biopython etc)
            • Jul 2009
            • 1544

            #6
            I'd try asking on the BioPerl mailing list - they're a helpful bunch

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-24-2026, 12:17 PM
            0 responses
            30 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-23-2026, 11:41 AM
            0 responses
            23 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-20-2026, 11:10 AM
            0 responses
            212 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-13-2026, 10:26 AM
            0 responses
            78 views
            0 reactions
            Last Post SEQadmin2  
            Working...