Learn R Programming

polyRAD (version 1.6)

readProcessSamMulti: 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),
                    contamRate = 0.001,
                    expectedAlleles = expectedLoci * 15,
                    maxLoci = expectedLoci)

Value

A "RADdata" object.

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.

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.

Author

Lindsay V. Clark

See Also

readProcessIsoloci

Examples

Run this code
if (FALSE) {
myRAD <- readProcessSamMulti("mydata_2_align.csv")
}

Run the code above in your browser using DataLab