Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ardmore
    Member
    • Jun 2011
    • 51

    #1

    Fastq to Fasta

    Hello I want to convert fastq to fasta, by google search I got a perl code.

    However my perl knowledge is almost zero, I don't know how to run this script. Do I need to input arguments for input or output file?
    Please give me an example.


    Thanks.
  • NicoBxl
    not just another member
    • Aug 2010
    • 264

    #2
    use awk :
    awk 'BEGIN{P=1}{if(P==1||P==2){gsub(/^[@]/,">");print}; if(P==4)P=0; P++}' input.fastq > output.fasta

    Comment

    • nickloman
      Senior Member
      • Jul 2009
      • 355

      #3
      Ardmore, you are cluttering the forum with questions that can be resolved by looking at existing, easily located resources on the Internet. I've previously voiced my concerns in another thread that you are trying to use the forum to solve coursework problems which in my opinion is not a legitimate use for it.

      My feeling is there's only so much time and effort the community should be prepared to put into newbie questions like yours. I would suggest you enrol in a basic course on scripting and/or bioinformatics, read some basic bioinformatics tutorials, or find a mentor at your institution who can help you.

      If you feel I am being unfair, perhaps you can explain what your project is and why we should help you with basics like running perl scripts.

      Comment

      • ardmore
        Member
        • Jun 2011
        • 51

        #4
        I understand your concern. But I am not a student for my course worker. Actually my major is not bioinformatics but I am doing daily bioinformatics project. Maybe I selected a wrong career? I don't have a time to enroll a perl course because the work is due very soon and perl is rarely used.

        I hope this forum can have a subforum for newbie. Thanks for your time and advice. I will keep quite in this forum.

        Comment

        • swbarnes2
          Senior Member
          • May 2008
          • 910

          #5
          It's not that you are a newbie. This field is only a few years old, everyone here started as a newbie just a few years ago. But everyone else started by reading some documentation, so that they understood what the hell they were talking about. You don't even know what a fastq file is!

          By posting here, you are asking people to spend their own time to answer your questions. People are by and large willing to do that, but not when you have demonstrated that you haven't invested a lick of your own time to understand even the basics of the work you are trying to do.

          Comment

          • bioBob
            Member
            • Mar 2011
            • 72

            #6
            I like the awk script. I modified a perl snip I found to also convert '.' to 'N' I found in some Illumina fastqs:

            cat FILEIN | perl -e '$i=0;while(<>){if(/^\@/&&$i==0){s/^\@/\>/;print;}elsif($i==1){s/\./N/g;print;$i=-3}$i++;}' > FILEOUT

            Just change filein and fileout as appropriate.
            Good luck.

            Comment

            • mgogol
              Senior Member
              • Mar 2008
              • 197

              #7
              Also try the fastx toolkit.

              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, Today, 02:55 AM
              0 responses
              4 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              11 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-23-2026, 11:41 AM
              0 responses
              11 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-20-2026, 11:10 AM
              0 responses
              24 views
              0 reactions
              Last Post SEQadmin2  
              Working...