trtools.qcSTR module
- trtools.qcSTR.OutputChromCallrate(chrom_calls, fname)
Plot number of calls per chromosome
- Parameters
chrom_calls (dict of str->int) – Number of calls for each chromosome
fname (str) – Filename of output plot
- trtools.qcSTR.OutputDiffRefBias(diffs_from_ref, reflens, fname, xlim=(0, 100), mingts=100, metric='mean', binsize=5)
Plot reflen vs. mean difference from ref bias plot
- Parameters
diffs_from_ref (list of int) – Difference of each allele call from the ref allele (in bp)
reflens (list of int) – List of reference allele lengths for each call (in bp)
fname (str) – Filename of output plot
xlim (tuple of int, optional) – Specify the minimum and maximum x-axis range (in bp)
mingts (int, optional) – Don’t plot data points computed based on fewer than this many genotypes
metric (str, optional) – Which metric to plot on the y-axis value. Must be mean or median
binsize (int, optional) – Size (in bp) of bins on the x-axis.
- trtools.qcSTR.OutputDiffRefHistogram(diffs_from_ref, fname)
Plot histogram of difference in bp from reference allele
- Parameters
diffs_from_ref (list of int) – Difference of each allele call from the ref allele (in units)
fname (str) – Filename of output plot
- trtools.qcSTR.OutputQualityLocusStrat(per_call_data, loci, fname)
Plot quality of calls, one line for each locus
- Parameters
per_call_data (numpy.ndarray) – 2D array of qualities of calls where each row is a locus and each col is a sample.
loci (List[str]) – List of the IDs of loci
fname (str) – Location to save the output plot
- trtools.qcSTR.OutputQualityPerCall(per_call_data, fname)
Plot quality of calls as one distribution, irrespective of which sample or locus they came from.
- Parameters
per_call_data (numpy.ndarray) – 1D array of the qualities of all calls
fname (str) – Location to save the output plot
- trtools.qcSTR.OutputQualityPerLocus(per_locus_data, fname)
Plot quality of calls per locus
- Parameters
per_locus_data (numpy.ndarray) – 1D array of an average quality for each locus, defined as the average of qualities of calls across all samples at that locus
fname (str) – Location to save the output plot
- trtools.qcSTR.OutputQualityPerSample(per_sample_data, fname)
Plot quality of calls per sample
- Parameters
per_sample_data (numpy.ndarray) – 1D array of the average quality for each sample, defined as the average of qualities of calls across all loci at that sample
fname (str) – Location to save the output plot
- trtools.qcSTR.OutputQualitySampleStrat(per_call_data, samples, fname)
Plot quality of calls, one line for each sample
- Parameters
per_call_data (numpy.ndarray) – 2D array of qualities of calls where each row is a locus and each col is a sample.
samples (List[str]) – List of the names of samples
fname (str) – Location to save the output plot
- trtools.qcSTR.OutputSampleCallrate(sample_calls, samples, fname)
Plot number of calls per sample
- Parameters
sample_calls (numpy.ndarray) – 1D array, number of calls for each sample
samples (List[str]) – List of names of samples, same len as sample_calls
fname (str) – Filename of output plot
- trtools.qcSTR.getargs()
- trtools.qcSTR.main(args)
- trtools.qcSTR.run()