Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wmseq
    Member
    • May 2011
    • 71

    #1

    How to remove the words and just keep the needed in a line?

    Hi every one,
    there are a lot lines in a fasta file as follows:

    >gi|319965812|ref|NW_003378297.1|Apis mellifera strain DH4 unplaced genomic scaffold, Amel_4.5 GroupUn22, whole genome shotgun sequence

    I just want to keep ">" and "GroupUn??", and delete other in each line of them, so that It should be like the following.

    >GroupUn22

    Any one could help me?

    Thanks a lot!!

    Richard
  • mdalessio
    Member
    • Oct 2013
    • 19

    #2
    I may not 100% understand what you are doing, but you can just edit FASTA in a text editor like gedit and just save it

    Comment

    • wmseq
      Member
      • May 2011
      • 71

      #3
      Thank you for your response!
      I am creating the reference genome according to the gff file.

      Comment

      • RDW
        Member
        • Oct 2008
        • 63

        #4
        perl -pe 's/^>.+(GroupUn.+),.+/>$1/' in.fasta >out.fasta

        Comment

        • gringer
          David Eccles (gringer)
          • May 2011
          • 845

          #5
          er, if you want precisely what you asked for, then:
          Code:
          cat input.fasta | perl -pe 's/^>.*(GroupUn..).*$/>$1/' > output.fasta
          ... but you probably don't want to do that, because that's just standard regular expression stuff that anyone with Perl experience should be able to work out themselves. It is unclear from your request what you would like to do that extends beyond this.

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by SEQadmin2




            NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
            Today, 06:46 AM
          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-28-2026, 09:57 AM
          0 responses
          24 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-28-2026, 09:51 AM
          0 responses
          15 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          68 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          48 views
          0 reactions
          Last Post SEQadmin2  
          Working...