getSNPs

craft.getSNPs.get_index_snps_bp(df, alpha, distance, mhc)[source]

TODO: docstring.

craft.getSNPs.get_index_snps_cm(df, alpha, distance, mhc, maps)[source]

Return a dataframe of index SNPs (with p > alpha)

This function selects the SNP with the lowest p value > alpha, adds it to the list of index SNPs, discards everything within ‘distance’ range.

craft.getSNPs.get_locus_snps(snps, index, distance_unit)[source]

Create dataframe of SNPs near index SNPs.

craft.getSNPs.interpolate_bp(cm, map_file)[source]

TODO: summary docstring line.

Given a genetic distance (cM) and chromosome return the base position. Exact matching not performed as precision of floating points for cM a match is unlikely. Base position with closest cM is returned.

craft.getSNPs.interpolate_cm(bp, map_file)[source]

TODO: summary docstring line.

Given a base position and recombination map file return the recombination distance (in centimorgans, cM). Interpolate if required.