readProcessSamMulti: Import Preliminary Data to Determine Parameters for Isolocus...

View source: R/data_import.R

readProcessSamMultiR Documentation

Import Preliminary Data to Determine Parameters for Isolocus Sorting

Description

This function imports the files output by process_sam_multi.py to a "RADdata" object so that HindHe can be run to filter samples and determine optimal parameters for process_isoloci.py.

Usage

readProcessSamMulti(alignfile,
                    depthfile = sub("align", "depth", alignfile),
                    expectedLoci = 1000,
                    min.ind.with.reads = 200,
                    min.ind.with.minor.allele = 10,
                    possiblePloidies = list(2), taxaPloidy = 2L,
                    contamRate = 0.001,
                    expectedAlleles = expectedLoci * 15,
                    maxLoci = expectedLoci)

Arguments

alignfile

A file output by process_sam_multi.py, generally in the format prefix_1_align.csv.

depthfile

A file output by process_sam_multi.py, generally in the format prefix_1_depth.csv.

expectedLoci

The number of loci expected in the final object. The default, 1000, is fairly small because this function is intended to be used for preliminary analysis only.

min.ind.with.reads

The minimum number of taxa with reads needed in order for a locus to be retained in the output.

min.ind.with.minor.allele

The minimum number of taxa with the same minor allele needed in order for a locus to be retained in the output.

possiblePloidies

A list indicating expected inheritance modes for markers. See RADdata.

taxaPloidy

A single integer, or an integer vector with one value per taxon, indicating ploidy. See RADdata.

contamRate

A number ranging from zero to one (although in practice probably less than 0.01) indicating the expected sample cross-contamination rate.

expectedAlleles

The expected number of alleles in the dataset.

maxLoci

The maximum number of loci to import before ceasing to read the file. Set to Inf if you want to read the entire file.

Value

A "RADdata" object.

Author(s)

Lindsay V. Clark

See Also

readProcessIsoloci

Examples

## Not run: 
myRAD <- readProcessSamMulti("mydata_2_align.csv")

## End(Not run)

polyRAD documentation built on Nov. 10, 2022, 5:14 p.m.