Inscan1() with a polygenic effect (that is, whenkinship is provided) and when doing multi-corecalculations, break up positions into intervals for more fine-graineduse of the multiple cores.
Added functioncompare_founder_geno() which is likecompare_geno(), but comparing the foundergenotypes.
read_cross2() formulti-way RIL if cross info is misspecified or has missing values.scan1snps(), subsetgenoprobs andmap to common positions, if they have different markers.(Issue #219)Fixed a problem withsdp_panel=TRUE inplot_snpasso(). (Issue #232)
Stopindex_snps() with an error if physical map hasmissing values. (Issue #218)
Changedread_csv() tofread_csv() toavoid conflict withreadr::read_csv(). (Issue#223)
Similarly, changedread_csv_numer() tofread_csv_numer().
Added functionfund_dup_markers(), for identifyingsubsets of markers with identical genotype data. This is a port ofqtl::findDupMarkers().
Havecalc_het() stop with an error if the genotypeshave labels that aren’t two characters, and add an explanation of thisin the help info. (Issue #220)
More fully explain the use of weights inest_herit()andscan1(). (Issue #221)
create_variant_query_func(), added new argumentsid_field andsdp_field, and increate_gene_query_func(), added argumentsname_field andstrand_field (Issue #215). Thisgives new flexibility, but also adds new requirements (for example, thatthe variant database has a field"snp_id") and so couldpotentially break working code.smooth_gmap() for smoothing out a genetic map,particularly to eliminate intervals with 0 recombination, by using a“mixture” of the map and constant recombination. Also addedunsmooth_gmap() which does the reverse.read_cross2() now gives a warning if sex isn’tprovided but is needed. Also, if sex is missing we assume allindividuals are female; previously we assumed they were male. (Issue#214)
Inplot_genes(), allow strand to be +/- 1 and notjust"+" or"-". (Issue #216)
Fixed date in citation, Broman et al. (2019)doi:10.1534/genetics.118.301595
plot_genes() there was a case wherestop was used that should have beenend.calc_genoprob() for the X chromosome, so that it just keepstrack of the chromosome from the DO/HS parent. In males, we are assumingthat the DO/HS parent is the mother.Added dependency on version of Rcpp (>= 1.0.7)
Revisedgenoprob_to_alleleprob() to work with DOF1and HSF1.plot_onegeno() should also work now in thesecases. (Issue #140 and Issue #141)
Revisedpredict_snpgeno() to work for DOF1 and HSF1populations.
Now give a better error message ingenoprob_to_snpprob() ifsnpinfo is missingthesdp column (Issue #207).
Inread_csv(), now give warnings if there areduplicate column names or duplicate row names in the file.
Inread_cross2(), moved the warning regarding thenumber of alleles to before the alleles object gets corrected (Issue#209).
Now issue a warning message if founder genotypes are included butnot used (Issue #211).
The treatment of the male X chromosome in DOF1 and HSF1 wasincorrect. We’re now assuming that the DO or HS parent was the mother inthe F1 cross, in which case males will be hemizygous for one of theDO/HS founder alleles.
The default colors for the Collaborative Cross (CC) have beenchanged to a color-blind friendly palette. The original CC colors remainasCCorigcolors; the previous default is nowCCaltcolors. The new colors are derived from the palette inWong (2011) Nature Methodsdoi:10.1038/nmeth.1618.
plot_coefCC() was revised to includecol=CCcolors as an argument. The default is the newcolor-blind friendly CC colors, but one can now more easily usecol=CCaltcolors orcol=CCorigcolors to get adifferent choice.
Addedplot_sdp() to plot the strain distributionpatterns of SNPs using tracks of tick-marks for each founder strain.(Issue #163)
Added argumentssdp_panel andstrain_labels toplot_snpasso() so that youcan include theplot_sdp() panel with the SNP associationresults and/or the genes.
Addedreplace_ids() for a matrix or data frame(using the row names as the individual IDs). (Issue #191)
Havecalc_het() give an error if the input are forallele dosages. (Issue #190)
Sneaky change inind_ids() makes it apply tocalc_genoprob andfst_genoprob objects. I’mnot sure how to document this. (Issue #189)
The output ofest_herit() now includes the residualSD as an attribute,"resid_sd". (Issue #16)
Implemented a cross type"hsf1" that is similar to"dof1", for a cross between an 8-way HS individual and a9th strain. (Issue #149)
calc_kinship() died with cryptic error if genotypeprobabilities didn’t have a names attribute; now usingseq_len(probs).
Give better error messages inest_map(),viterbi(), andsim_geno() if the cross ismissing the genetic map.
Fixed Issue #194:calc_genoprob() was takingchromosome names fromcross$gmap which might have beenmissing; now usingnames(cross$geno).
Fixed Issue #195: increate_snpinfo(), drop markersthat are non-informative.
Fixed Issue #196, thatstep() returns-Inf rather thanNaN for general AIL. This hadto do with the handling of-Inf inaddlog().
Infit1() andscan1coef(), wasn’tgrabbing the... arguments. properly.
Ugly c++ revisions to avoid clang UBsan warnings on CRAN. (Issue#169)
Revisedreduce_markers() so that it can handle thecase ofmany markers, by working with them in smallerbatches.
fit1() now returns both fitted values andresiduals.
fit1() can be run with genotype probabilitiesomitted, in which case an intercept column of 1’s is used (Issue#151).
Updated mouse gene database with 2020-09-07 data fromMGI.
Implemented Issue #184, to makecalc_het()multi-core.
Make thevdiffr packageoptional: only test the plots locally, and only if vdiffr isinstalled.
calc_sdp() can now take a plain vector (Issue#142).
Added alodcolumn argument tomaxlod()(Issue #137).
FixedIssue#181, wherecalc_het() gave values > 1 when usedwithR/qtl2fst-basedprobabilities. Also fixed a similar bug incalc_geno_freq().
FixedIssue#172, wherefit1() gave incorrect fitted values whenkinship is provided, because they weren’t “rotatedback”.
fit1() no longer provides individual LOD scores(ind_lod) whenkinship is used, as with thelinear mixed model, the LOD score is not simply the sum of individualcontributions.
FixedIssue#174 regenoprob_to_alleleprob() for general AILcrosses. We had not implemented thegeno2allele_matrix()function.
Fixed Issue #164, soplot_pxg() can handle aphenotype that is a single-column data frame.
Fixed Issue #135, soplot_scan1() can take vectorinput (which is then converted to a single-column matrix).
Fixed Issue #157, to havecalc_genoprob() give abetter error message about missing genetic map.
Fixed Issue #178, to haveread_cross2() give awarning not an error if incorrect number of alleles.
Fixed Issue #180 rescan1() error if phenotypes’rownames have rownames.
Fixed Issue #146, revisingpredict_snpgeno() so thatit works for homozygous populations, like MAGIC lines or theCollaborative Cross.
Fixed Issue #176, thatguess_phase() doesn’t workwith cross type"genail". Needed to definephase_known_crosstype as"genailpk" incross_genail.hbecause otherwiseis_phase_known() will returnTRUE.
Fixed compilation error on Solaris on CRAN, due to a log(10) andsqrt(10). Solaris refuses to do log(int) or sqrt(int), I guess.
Fixed some conflicting enum definitions in c++ code
Added recognition of the R Core Team as a contributor, as thepackage includes a copy of code for Brent’s method for univariatefunction optimization. Also added a Copyright field in the DESCRIPTIONfield, explaining the copyright of that code.
Sped up some of the examples and tests. Tests no longer use morethan 2 cores (even those that are only run locally).
Added\value{} sections in the documentation forvarious functions. Added further explanation of"viterbi","scan1","scan1perm", etc. S3 classes in thedocumentation.
Added some functions for diagnostics:recode_snps(),calc_raw_het(),calc_raw_geno_freq(),calc_raw_maf(), andcalc_raw_founder_maf().
Added argumentblup tofit1(), forgetting BLUPs for a single fixed QTL position. At present, just givesestimates and coefficients by callingscan1blup() with asingle position.
pull_genoprobpos() can now take either a marker name(as before) or a set of map, chromosome, and position (from which itusesfind_marker() to get the marker name).
Added plot function for the results ofcompare_geno(). (Plots histogram of uppertriangle.)
Added functionsn_founders() andfounders() for getting the number of founders and thefounder strain names for a cross2 object.
scan1() now takes an optionalhsqargument, so that the residual heritability may be specified rather thanestimated.
write_control_file() now allows cross info codeswith a cross info file (previously only allowed with a covariate).read_cross2() gives a warning if there are cross infoconversion codes but more than one cross info column.
Small fix inread_cross2() to allow multiple crossinfo covariates.
Added a check that the founder genotypes have the same strain IDson each chromosome.
convert2cross2() now includesallelescomponent even if it wasn’t present as an attribute.
Added functionsdp2char() for converting numeric SDPcodes to character strings like"ABC|DEFGH".
Updated mouse gene database with 2019-08-12 data fromMGI.
get_common_ids() strips off names from output, justin case.
Added internal functionsrqtl1_crosstype() andrqtl1_chrtype().
Fixed typo in help forscan1() and relatedfunctions.
genoprob_to_snpprob() was giving an error if yougave a cross2 object in place of a snpinfo table and it had monomorphicmarkers.
Fixed problem with weights inscan1() and relatedfunctions when their derived fromtable(). Make surethey’re a plain numeric vector, not an array.
Fixedcheck_cross2(): the check for invalidgenotypes wasn’t happening.
Better error message for the case that there are no markers incommon between map and genotypes.
extract_dim_from_header(), used byread_cross2() andread_csv(), now just looksfor the number part in the rest of the line.
maxlod() now handles missing values (forcingna.rm=TRUE). If all values are missing it gives a warningand returns-Inf. [Fixes Issue #134.]
Inmax_scan1(), treat the case that the input has nocolumn names. [Fixes Issue #133.]
max_scan1() was giving a messed up error message iflodcolumn was out of range. [Fixes Issue #132.]
Revised the scriptinst/scripts/create_ccvariants.Rto captureall of the consequences and genes for each SNP(rather than just the first), and fixing a bug that prevented capture ofindels from chromosomes 6-X. Consequently, revised the example SQLitedatabaseextdata/cc_variants_small.sqlite and associatedtests.
scan1coef() andfit1() now, by default,gives coefficient estimates for the QTL effects that sum to 0, with anadditional coefficient being the intercept. This makes it more likeDOQTL (andscan1blup()). The previous behavior can beobtained with the argumentzerosum=FALSE.
Added functioncreate_snpinfo() for creating a SNPinformation table from a cross2 object, for use withscan1snps().
Updatedextdata/mouse_genes_small.sqlite usingupdated MGI annotations. Some of the field names have changed.
Incheck_cross2(), added a test for alleles being avector of character strings.
Fixed some tests for R 3.6, due to change in random numbergeneration.
Use Markdown for function documentation, throughout
Ingenoprob_to_snpprob() when a cross object isprovided, make sure the genotype probabilities get subset to the crossmarkers.
Fixed bug inscan1snps() rekeep_all_snps=FALSE. It wasn’t subsetting to the index SNPsproperly. Added an internal functionreduce_to_index_snps(). (SeeIssue #89.)
Fixed bug in step probabilities for 4-, 8-, and 16-way RIL byselfing.
Fixed bug inzip_datafiles() when the files are in asubdirectory. (SeeIssue #102.)
Fixed bug inplot_peaks() for the case that theinputpeaks object does not contain QTL intervals. (SeeIssue #107.)
Fixed inappropriate warning message for check ofcross_info with cross typerisib8.
Fixed bugs inguess_phase() andlocate_xo() where we needed anany() around acomparison of two vectors.
Addedplot_lodpeaks() for scatterplot of LOD scorevs position for inferred QTL fromfind_peaks()output.
Added new cross types"genril" and"genail", implemented to handle any number of founders;include the number of founders in the cross type, for example"genril38" or"genail38". The crossinformation has length 1 + number of founders, with first column beingthe number of generations and the remaining columns being non-negativeintegers that indicate the relative frequencies of the founders in theinitial population (these will be scaled to sum to 1)."genril" assumes the progeny are inbred lines (recombinantinbred lines, RIL), while"genail" assumes the progeny havetwo random chromosomes (advanced intercross lines, AIL).
The internal functionbatch_vec() now madeuser-accessible, and takes an additional argumentn_cores.This splits a vector into batches for use in parallelcalculations.
The internal functioncbind_expand() now madeuser-accessible. It’s for combining matrices using row names to alignthe rows and expanding with missing values if there are rows in somematrices but not others.
Inplot_peaks(), addedlod_labelsargument. If TRUE, include LOD scores as text labels in thefigure.
Added functioncalc_het() for calculating estimatedheterozygosities, by individual or by marker, from genotypeprobabilities derived bycalc_genoprob().
Small corrections to documentation.
Revise some tests due to change in Recla and DOex datasets athttps://github.com/rqtl/qtl2data
Add tests of decomposed kinship matrix (fromdecomp_kinship()) withscan1().
rbind_scan1() andcbind_scan1() nolonger give error if inputs don’t all have matching attributes.
Change default gap between chromosomes inplot_scan1() (and related) to be 1% of the total genomelength.
Fixed bug insubset_kinship() that preventedscan1() from working with decomposed “loco” kinshipmatrices.
Fixed descriptions in help files forcbind.calc_genoprob() andrbind.calc_genoprob(), for column- and row-binding genotypeprobabilities objects (as output bycalc_genoprob().cbind() is for the same set of individuals but differentchromosomes.rbind() is for the same set of markers andgenotypes but different individuals. Made similar corrections for therelated functions forsim_geno() andviterbi()output.
Addedpull_genoprobint() for pulling out thegenotype probabilities for a given genomic interval. Useful, forexample, to applyscan1blup() over a defined intervalrather than an entire chromosome.
scan1(),scan1perm(),scan1coef(),fit1(), andscan1snps() can now use weights whenkinshipis provided, for example for the case of the analysis of recombinantinbred line (RIL) phenotype means with differing numbers of individualsper line. The residual variance matrix is like
Addweights argument toest_herit().
Addedadd_threshold() for adding significancethresholds to a genome scan plot.
Addedpredict_snpgeno() for predicting SNP genotypesin a multiparent populations, from inferred genotypes plus the founderstrains’ SNP alleles.
Ingenoprob_to_snpprob(), thesnpinfoargument can now be a cross object (for a multiparent population withfounder genotypes), in which case the SNP information for all SNPs withcomplete founder genotype data is calculated and used.
max_scan1() withlodcolumn=NULL returnsthe maximum for all lod score columns. Ifmap is included,the return value is in the form returned byfind_peaks(),namely withlodindex andlodcolumn argumentsadded at the beginning.
Addedreplace_ids() for replacing individual IDs inan object. S3 method for"cross2" objects and output ofcalc_genoprob(),viterbi(),maxmarg(), andsim_geno().
Addedclean_scan1() plus generic functionclean() that works with both this and withclean_genoprob().clean_scan1() replacesnegative values withNA and removes rows that have allNAs.
More informative error message inest_herit(),scan1(), etc., when covariates and other data are notnumeric.
Fixedpull_genoprobpos() so it will work withqtl2feather(andqtl2fst).
Inplot_genes(), ifxlim is provided asan argument, subset the genes to those that will actually appear in theplotting region.
Revisefind_marker() so that the inputmap can also be a “snp info” table (with columns"snp_id","chr" and"pos").
Addedfind_index_snp() for identifying the index SNPthat corresponds to a particular SNP in a snp info table that’s beenindexed withindex_snps().
Addoverwrite argument (defaultFALSE)tozip_datafiles(), similar to that forwrite_control_file().
plot_snpasso() now takes an argumentchr.
max_scan1() no longer gives a warning ifmap is not provided.
insert_pseudomarkers() will now acceptpseudomarker_map that includes only a portion of thechromosomes.
Infit1(), replacedtol andmaxit and added... which takes these plus afew additional hidden control parameters.
Fix a bug inindex_snps(); messed up results whenstart andend outside the range of themap.
Fix a bug inscan1snps() regarding use ofchr argument: need to force to be unique character strings,and avoid unnecessary warning aboutstart andend.
Fix a bug inscan1snps() where it didn’t check thatthegenoprobs andmap conform.
Revised underlying binary trait regression function to avoid someof the tendency towards NAs.
Added functionclean_genoprob() which cleansgenotype probabilities by setting small values to 0 and, for genotypecolumns where the maximum value is not large, setting all values to 0.This is intended to help with the problem of unstable estimates ofgenotype effects inscan1coef() andfit1()when there’s a genotype that is largely absent.
Added functioncompare_maps() for comparing markerorder between two marker maps.
Revised the order of arguments inreduce_markers()to matchpick_marker_subset(), because I like the latterbetter. Removed the functionpick_marker_subset() becauseit’s identical toreduce_markers(). (Seriously, Iimplemented the same thing twice.)
plot_coef() now uses a namedlodcolumnargument, if provided, to subsetscan1_output, if that’sprovided.
In the documentation forscan1coef(),scan1blup(), andfit1(), revised the suggestedcontrasts for getting additive and dominance effects in anintercross.
plot_coef() withscan1_output provided,ylim_lod was being ignored.find_peaks() andmax_scan1() can now takesnpinfo tables (as produced byindex_snps() andscan1snps()) in place of the map.find_peaks().find_peaks(). (Stopped witherror if no LOD scores were above the threshold.)The output offit1() now includes fittedvalues.
Added functionpull_genoprobpos() for pulling out aspecific position (by name or position) from a set of genotypeprobabilities.
Thechr column in the result offind_peaks() is now a factor. This makes it possible tosort by chromosome. Also added an argumentsort_by forchoosing how to sort the rows in the result (by column, genomicposition, or LOD score).
Inmax_scan1(), ifmap isnotprovided, rather than stopping with an error, we just issue a warningand return the genome-wide maximum LOD score.
Revisedfind_markerpos() so it can take a map (as alist of vectors of marker positions) in place of a"cross2"object.
plot.scan1(), which failed to passlodcolumn toplot_snpasso().The previously separate packages qtl2geno, qtl2scan, qtl2plot, andqtl2db have now been combined into one package.