Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Commit

Permalink
Tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
pjotrp committed Dec 6, 2009
1 parent 8439508 commit 2755ff1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/clibs/rqtl
24 changes: 6 additions & 18 deletions src/extra/ruby/test/test_rqtl_mqm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@

=begin
Here we load the R/qtl Listeria dataset (from a CSV) and verify the resulting
information matches that of the R version (see RQTL book page 46). In R we
would do:
> library(qtl)
> data(listeria)
> mr = scanone(listeria,"mr")
Find the special classes for loading QTL input files (part of BioLib 'extra').
Like with the R/qtl scanone example we load the R/qtl Listeria dataset (from a CSV).
>> $: << '..'
>> require 'qtl/rqtl'
Expand All @@ -45,21 +37,17 @@
>> qtl = QTL.new(LISTERIA)
You can also provide the allowed genotypes:
Alternatively provide the allowed genotypes for validation
>> validate = QtlValidateGenotypes.new(['A','B'],['A','H','B','D','C'],['-','NA'])
>> qtl = QTL.new(LISTERIA,validate)
Fetch the loaded data and check the type (defaults to F2 at this point)
R/qtl makes it an F2 intercross based on the number of genotypes
For the heck of it we make sure it is there
>> d = qtl.data
>> d.type
=> :f2
>> d.individuals.size
=> 120
Here we get information from the data object. There are two 'styles'. One is
standard Ruby's principles of least surprise. The other is the one used by
R/qtl. See test_rqtl.rb for more.
Now we follow the MQM tutorial in FIXME: location
=end

Expand Down

0 comments on commit 2755ff1

Please sign in to comment.