wiki:xQTLBioinformaticianRCheatSheet

Version 2 (modified by jvelde, 13 years ago) (diff)

--

TracNav(xQTL)?

xQTL workbench - Cheat sheet for R scripting

Get a simple overview of all data matrices

find.data()[,c("id","name")]

Download a data matrix

dataId <- 0
data <- downloadmatrixascsvCURL(dataId)

Upload a completely new data matrix, including annotations

invId <- 0
data <- NULL
data <- rbind(data, c("A", "B"))
data <- rbind(data, c("B", "A"))
marker1 = add.marker(name="myMarker1", cm="10.0", investigation_id=invId)
marker2 = add.marker(name="myMarker2", cm="20.0", investigation_id=invId)
ind1 = add.individual(name="myInd1", investigation_id=invId)
ind2 = add.individual(name="myInd2", investigation_id=invId)
colnames(data) <- c("myInd1", "myInd2")
rownames(data) <- c("myMarker1", "myMarker2")
add.datamatrix(data, name="myResults", investigation_id=invId, rowtype="Marker", coltype="Individual", valuetype="Text")