make.consensus.seqs: Automatically make consensus sequences by grouping .ab1 files...

Description Usage Arguments Value

Description

Automatically make consensus sequences by grouping .ab1 files by name.

Usage

1
2
3
4
5
6
make.consensus.seqs(input.folder, forward.suffix, reverse.suffix,
  min.reads = 2, trim = TRUE, trim.cutoff = 1e-04, min.length = 20,
  max.secondary.peaks = NULL, secondary.peak.ratio = 0.33,
  ref.aa.seq = NULL, minInformation = 0.5, threshold = 0.5,
  genetic.code = GENETIC_CODE, accept.stop.codons = TRUE,
  reading.frame = 1, processors = NULL)

Arguments

input.folder

The parent folder of all of the reads contained in ab1 files you wish to analyse. Subfolders will be scanned recursively.

forward.suffix

the suffix of the filenames for forward reads, i.e. reads that do not need to be reverse-complemented. Include the full suffix, e.g. "forward.ab1".

reverse.suffix

the suffix of the filenames for reverse reads, i.e. reads that *do* need to be reverse-complemented. Include the full suffix, e.g. "reverse.ab1".

min.reads

The minimum number of reads required to make a consensus sequence, must be 2 or more (default 2).

trim

TRUE/FALSE trim sequences based on quality while creating readgroup? If TRUE, the trim.mott function is applied to each sequence before inclusion in the readgroup. Note, trimming only works if the raw data are stored in ab1 files with appropriate information.

trim.cutoff

value passed to trim.mott as quality cutoff for sequencing trimming, only used if 'trim' == TRUE

min.length

reads shorter than this will not be included in the readset. The default (20) means that all reads with length of 20 or more will be included. Note that this is the length of a read after it has been trimmed.

max.secondary.peaks

reads with more secondary peaks than this will not be included in the readset. The default (NULL) is to include all reads regardless of secondary peaks

secondary.peak.ratio

Only applies if max.secondary.peaks is not NULL. The ratio of the height of a secondary peak to a primary peak. Secondary peaks higher than this ratio are counted. Those below the ratio are not.

ref.aa.seq

an amino acid reference sequence supplied as a string or an AAString object. If your sequences are protein-coding DNA seuqences, and you want to have frameshifts automatically detected and corrected, supply a reference amino acid sequence via this argument. If this argument is supplied, the sequences are then kept in frame for the alignment step. Fwd sequences are assumed to come from the sense (i.e. coding, or "+") strand.

minInformation

minimum fraction of the sequences required to call a consensus sequence at any given position (see the ConsensusSequence() function from DECIPHER for more information). Defaults to 0.5 implying that 3/4 of all reads must be present in order to call a consensus.

threshold

Numeric giving the maximum fraction of sequence information that can be lost in the consensus sequence (see the ConsensusSequence() function from DECIPHER for more information). Defaults to 0.5, implying that each consensus base can ignore at most 50 percent of the information at a given position.

genetic.code

Named character vector in the same format as GENETIC_CODE (the default), which represents the standard genetic code. This is the code with which the function will attempt to translate your DNA sequences. You can get an appropriate vector with the getGeneticCode() function. The default is the standard code.

accept.stop.codons

TRUE/FALSE. TRUE (the defualt): keep all reads, regardless of whether they have stop codons; FALSE: reject reads with stop codons. If FALSE is selected, then the number of stop codons is calculated after attempting to correct frameshift mutations (if applicable).

reading.frame

1, 2, or 3. Only used if accept.stop.codons == FALSE. This specifies the reading frame that is used to determine stop codons. If you use a ref.aa.seq, then the frame should always be 1, since all reads will be shifted to frame 1 during frameshift correction. Otherwise, you should select the appropriate reading frame.

processors

The number of processors to use, or NULL (the default) for all available processors

Value

Note that the consensus.tree should not be used for inference, but only as a guide to help judge problems in the consensus sequences. This tree is built using ape's njs() function, and negative branch lengths are then converted to their absolute values. The latter process aids viewing clarity (so should help when looking for problems in the consensus seuqences), but has little biological validity.


mammerlin/sangeranalyseR documentation built on May 13, 2019, 1:08 p.m.