diff options
author | zsloan | 2020-04-29 11:19:28 -0500 |
---|---|---|
committer | zsloan | 2020-04-29 11:19:28 -0500 |
commit | 89324f71e4b11f8b8ee84b13c6b69cda446ac840 (patch) | |
tree | 74e0b0854fcfb5c9d848978059577f9a6534564e | |
parent | 5b57353c5325a2677fef07630d2576a01641787a (diff) | |
parent | cd05cb4782c22abdf299f033a39ccfa82be38596 (diff) | |
download | genenetwork2-89324f71e4b11f8b8ee84b13c6b69cda446ac840.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
-rw-r--r-- | wqflask/wqflask/marker_regression/rqtl_mapping.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/wqflask/wqflask/marker_regression/rqtl_mapping.py b/wqflask/wqflask/marker_regression/rqtl_mapping.py index e1aa290b..c1a56787 100644 --- a/wqflask/wqflask/marker_regression/rqtl_mapping.py +++ b/wqflask/wqflask/marker_regression/rqtl_mapping.py @@ -128,7 +128,7 @@ def generate_cross_from_geno(dataset): # TODO: Need to figure out why som if(type == '4-way'){ genocodes <- c('1','2','3','4') } else { - genocodes <- c(getGenoCode(header, 'mat'), getGenoCode(header, 'het'), getGenoCode(header, 'pat')) # Get the genotype codes + genocodes <- c(getGenoCode(header, 'mat'), getGenoCode(header, 'het'), getGenoCode(header, 'pat')) # Get the genotype codes } genodata <- read.csv(genotypes, sep='\t', skip=toskip, header=TRUE, na.strings=getGenoCode(header,'unk'), colClasses='character', comment.char = '#') cat('Genodata:', toskip, " ", dim(genodata), genocodes, '\n') @@ -139,8 +139,17 @@ def generate_cross_from_geno(dataset): # TODO: Need to figure out why som cbind(genodata[,c('Locus','Chr', 'cM')], genodata[, 5:ncol(genodata)])) # Genotypes write.table(outCSVR, file = out, row.names=FALSE, col.names=FALSE,quote=FALSE, sep=',') # Save it to a file require(qtl) - cross = read.cross(file=out, 'csvr', genotypes=genocodes) # Load the created cross file using R/qtl read.cross - if(type == 'riset') cross <- convert2riself(cross) # If its a RIL, convert to a RIL in R/qtl + if(type == '4-way'){ + cat('Loading in as 4-WAY\n') + cross = read.cross(file=out, 'csvr', genotypes=genocodes, crosstype="4way", convertXdata=FALSE) # Load the created cross file using R/qtl read.cross + }else{ + cat('Loading in as normal\n') + cross = read.cross(file=out, 'csvr', genotypes=genocodes) # Load the created cross file using R/qtl read.cross + } + if(type == 'riset'){ + cat('Converting to RISELF\n') + cross <- convert2riself(cross) # If its a RIL, convert to a RIL in R/qtl + } return(cross) } """ % (dataset.group.genofile)) |