GithubHelp home page GithubHelp logo

ssqc's Introduction

ssqc <path/to/parm.file>
Script reads parameter file (see below) for a file indicating which sequences to process.

parm.file:
  paired-end true or false if sequence is paired end (note: collaps samples that cross lanes e.g., cat <name-L00[1-4]-R1.fastq.gz > name-R1.fastq.gz)
  fastq-files        </path/to/file> contains a list of fastq.gz files, paired ends alternate with naming convension name-R1.fastq.gz and name-R2.fastq.gz
  is_input   <integer> copies of internal standard added to sample.
  cc_expected        <integer> determined after several runs..expected count of unique CC sequences when no significant NT competition.
  nt2is </path/to/file> contains the mapping of NT to IS, base changes in lowercase
  ref </path/to/files> path to the reference genome
  seqSplit <true/false> determine if the NT and IS reads are to divided into separate bam and fastq
  multiple-lanes	true or false Not implemented. Script does not handle illumina 4 lane fastq.  Use catMultLane to concatenate lanes
  qScore	Sorting reads into NT, IS, REC, CC, &  ukn bins uses base change position, to use position for splitting qScore must be at or above (zero ignores)
  goodBaseChange	Number of base change positions required for sorting, otherwise ends up in ukn bin 
  calcCov	true or false generate coverage table to be used for viral load, otherwise use NT and IS read counts
  covBed	table used by samtools bedcov for coverage analysis

Program flow: read parameters; if needed--align reads; call remRecombinants to count CC and remove recombinants; calculate NT and IS reads; create runQC table; calculate viral load
viral load calculated from total amplicon reads NT / IS * IS_INPUT
runQC uses the NT and IS CC-reads to adjust expected complexity capture (cc_expected) for competition.  Unique CC sequences calculated from -CC-counts.txt
Coverage calculated using bamstats amplicon counting method

Key files produced:
viralLoad.txt contains the estimated viral genomes present when IS was mixed with sample
runQC.txt indicates how far the complexity capture deviated from expected.

The Other files:
<prefix>-NT-R1.fastq or <prefix>-NT-R2.fastq are the viral reads, and should be compatible with your viral assembly pipeline
-IS-R1.fastq or -IS-R2.fastq are the IS reads  
-bad-R1.fastq or -bad-R2.fastq are the recombinant reads 
-IS.coverage, -cc.coverage, -NT.coverage, or -bad.coverage a table listing the reads for each amplicon, used for viral load.
-tallies.txt a table indicating occurrences and position of recombinants
-CC.txt table the source/quality of a samples CC sequences.
-CC-counts.txt a summary table created from the CC.txt file.
Bam and sam intermediate files used to create fastq and coverage.

The code has room for optimization but we should settle on the final deliverable before moving to optimization.  Also, Iā€™m a hacker, so Iā€™m happy to hear of any suggestions for code improvements.

Dependencies:

bwa
Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler Transform. Bioinformatics, 25:1754-60

samtools
https://github.com/samtools/samtools

Part of ssqc package: remRecombo (count CC & sort sequences), coverage or baseCount (used for viral load calculation), catMultLane & covTable are accessory scripts to concatentate multilane fastq and create coverage data table of all run samples. Various COVID reference files: reference genomes, coverage.bed & look up table.
Tom Morrison, AccuGenomics.  [email protected]

Version control
9/22/20 - added ability to process ubam and added undeduped CC reads to runQC.txt.
11/27/20 - Analysis options controled by ssqc.parm file.  

ssqc's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.