Difference between revisions of "Cbcb:Pop-Lab:16S-pipeline 16S analysis pipeline (for Gates project)"

From Cbcb
Jump to navigation Jump to search
Line 39: Line 39:
  
 
<pre>${SCRIPTDIR}/code2part.pl [batch].csv [batch].all.seq [batch] > [batch].part</pre>
 
<pre>${SCRIPTDIR}/code2part.pl [batch].csv [batch].all.seq [batch] > [batch].part</pre>
 +
 +
The files [batch].BAD.list and [batch].NONE.list contain the names of all sequences that have failed quality checks either because they are too short, or contain Ns (BAD), or because the barcode is not recognized (NONE). The files contain additional information that can be used to troubleshoot the pipeline:  sequences that are too short (< 75 454 cycles) are followed by the number of cycles, sequences that either contain Ns or have an unknown barcode are followed by the first 8 characters in the sequence.
 +
 +
* Break up the fasta file into separate batches by partition

Revision as of 16:28, 21 November 2009

16S analysis pipeline

Assumptions:

  • 16S rRNA sequences are generated with barcoded 454 and are received as either: (i) .sff file; (ii) fasta and quality file; (iii) just fasta file
  • each batch is a single 96-well plate and is accompanied by a tab-delimited file containing information about the sample, including the "Sample ID", well on the plate, and additional information regarding the sample quality and DNA concentration
  • we have a file that specifies the barcode and sequencing adapter used for each well (these entities do not change).

Directory structure

Gates_SOM/
   Main/
     samples.csv  - information about all the samples available to us
     454.csv      - information about all 454 runs (essentially concatenation of .csvs from 454 dir)
     phylochip.csv - information about all Phylochip runs
     IGS_Barcodes.csv - information about barcodes used to multiplex 454 runs
     scripts/     - scripts used to process the data
     454/         - here's where all 454 sequences live
       [batch1]/  - ... each batch in a separate directory
          [batch1].csv - meta-information about the batch 
          [fasta1]- fasta files containing the batch
          ... 
          [fastan]
          [batch1].part - partition file describing how the sequences get split by barcode/sample
          part/   - directory where all the partitioned files live 
       ... 
       [batchn]
     Phylochip/   - all the CEL files and auxiliary information on the Phylochip runs

Step 1: Cleanup meta-information

  • Convert the Excel sheet containing the batch information into tab-delimited file (and run dos2unix) making sure the quotes added by Excel/OOffice are removed, adding the date (if not already in the file), and sorting the file by Sample ID. At this stage also check that the header row information is in canonical format.
  • Add barcode information using add_barcode.pl
${SCRIPTDIR}/add_barcode.pl [batch].csv ${MAINDIR}IGS_Barcodes.csv > [batch]_barcode.csv
  • Create partition file

First concatenate all the sequence files (if multiple) from a batch into a single file [batch].all.seq.

${SCRIPTDIR}/code2part.pl [batch].csv [batch].all.seq [batch] > [batch].part

The files [batch].BAD.list and [batch].NONE.list contain the names of all sequences that have failed quality checks either because they are too short, or contain Ns (BAD), or because the barcode is not recognized (NONE). The files contain additional information that can be used to troubleshoot the pipeline: sequences that are too short (< 75 454 cycles) are followed by the number of cycles, sequences that either contain Ns or have an unknown barcode are followed by the first 8 characters in the sequence.

  • Break up the fasta file into separate batches by partition