kbroman / qtl

R/qtl: A QTL mapping environment
https://rqtl.org
GNU General Public License v3.0
77 stars 45 forks source link

Check that the nb of loci is consistent when loading "MapQTL" files #18

Closed timflutre closed 10 years ago

timflutre commented 10 years ago

On the devel branch, in the file read.cross.mq.R at line 197, could you add the following lines?

    if(locus.id > nb.loci + 1){
        msg <- paste("there seems to be more loci (", locus.id-1,
                             ") than indicated in the header (", nb.loci, ")")
        stop(msg, call.=FALSE)
    }

A similar check is already in place for the number of traits (line 662 of the same file).

Sorry for forgetting this in the first place.

kbroman commented 10 years ago

Done.