Sample Name list generator - AndreaRP/METAGENOMICS GitHub Wiki

To get the sample name of each of your samples you can run [samplesID_gen.sh] (https://github.com/AndreaRP/METAGENOMICS/blob/wrapper/samplesID_gen.sh)

Usage

bash samplesID_gen.sh

Note that you should have placed all the read files in ANALYSIS/00-reads for this script to work.

In a nutshell...

    1. Gets the sample name from the file names in 00-reads folder. Given raw read files with the following name structure:
  • sampleName_*R1*.fastq.gz
  • sampleName_*R2*.fastq.gz

The sample name will be the word before the first underscore ('_') in the read file name.

I/O

  • Input Files (In ANALYSIS/00-reads/)

    • sampleName1_*R1*.fastq.gz
    • sampleName1_*R2*.fastq.gz
    • sampleName2_*R1*.fastq.gz
    • sampleName2_*R2*.fastq.gz
    • sampleName3_*R1*.fastq.gz
    • sampleName3_*R2*.fastq.gz
    • ...
    • sampleNameN_*R1*.fastq.gz
    • sampleNameN_*R2*.fastq.gz
  • Output Files (in ANALYSIS/)

    • samples_id.txt: File containing a list with the name of each sample.