Announcement

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

  • books for linux shell scripting and python?

    Can you guys recommend a good introductory book for shell scripting, and maybe python? I'm going to have to learn it better.

    e.g. what does the % mean here?

    for f in *.fasta.gz
    do
    metaphlan2.py $f --input_type fasta --nproc 4 > ${f%.fasta.gz}_profile.txt
    done

    thanks
    John

  • #2
    Code:
    $ ls *.fastq.gz
    P1.fastq.gz  P2.fastq.gz  Pdot1.fastq.gz  Pdot2.fastq.gz
    Compare the list above to the output below. Can you see what f% is doing?

    Code:
    $ for f in *.fastq.gz; do echo ${f%.fastq.gz}; done
    
    P1
    P2
    Pdot1
    Pdot2

    Comment


    • #3
      Thanks!

      I have all the fastq files in the dir of /fastq. but I don't need /fastq, only need P1, P2...
      Is there an easy way to pick up what the * stands for?

      John

      for f in fastq/*.fastq.gz; do echo ${f%.fastq.gz}; done


      Originally posted by GenoMax View Post
      Code:
      $ ls *.fastq.gz
      P1.fastq.gz  P2.fastq.gz  Pdot1.fastq.gz  Pdot2.fastq.gz
      Compare the list above to the output below. Can you see what f% is doing?

      Code:
      $ for f in *.fastq.gz; do echo ${f%.fastq.gz}; done
      
      P1
      P2
      Pdot1
      Pdot2

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Advanced Methods for the Detection of Infectious Disease
        by seqadmin




        The recent pandemic caused worldwide health, economic, and social disruptions with its reverberations still felt today. A key takeaway from this event is the need for accurate and accessible tools for detecting and tracking infectious diseases. Timely identification is essential for early intervention, managing outbreaks, and preventing their spread. This article reviews several valuable tools employed in the detection and surveillance of infectious diseases.
        ...
        11-27-2023, 01:15 PM
      • seqadmin
        Strategies for Investigating the Microbiome
        by seqadmin




        Microbiome research has led to the discovery of important connections to human and environmental health. Sequencing has become a core investigational tool in microbiome research, a subject that we covered during a recent webinar. Our expert speakers shared a number of advancements including improved experimental workflows, research involving transmission dynamics, and invaluable analysis resources. This article recaps their informative presentations, offering insights...
        11-09-2023, 07:02 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 08:26 AM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:12 AM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 11-27-2023, 08:12 AM
      0 responses
      19 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 11-22-2023, 09:29 AM
      1 response
      60 views
      0 likes
      Last Post VilliamPast  
      Working...
      X