Changes between Version 3 and Version 4 of xQTLBioinformaticianRCheatSheet
- Timestamp:
- 2011-10-27T10:17:03+02:00 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
xQTLBioinformaticianRCheatSheet
v3 v4 3 3 = [wiki:xQTL xQTL workbench] - Cheat sheet for R scripting = 4 4 5 === Get a parameter from server === 6 `size <- getparameter("size",jobparams)` 5 == Downloading == 7 6 8 === Do a status update === 9 `report(2,"Loading 5%...")` 7 === Retrieve annotations, all attributes === 8 9 `find.marker()`[[BR]] 10 `find.individual()`[[BR]] 11 `find.investigation()` 12 13 === Retrieve annotations, specific attributes === 14 15 `find.marker()[,c("name")]`[[BR]] 16 `find.individual()[,c("name","investigation_name")]`[[BR]] 17 `find.investigation()[,c("id","name")]` 10 18 11 19 === Get a simple overview of all data matrices === 12 `find.data()[,c("id","name")]`13 20 14 === Download a data matrix === 21 `find.data()[,c("id","name","investigation","investigation_name")]` 22 23 === Retrieve a data matrix === 24 15 25 `dataId <- 0`[[BR]] 16 26 `data <- downloadmatrixascsvCURL(dataId)` 17 27 18 === Upload a completely new data matrix, including annotations === 28 29 == Uploading == 30 31 === Add annotations === 32 33 `invId <- 0`[[BR]] 34 `add.individual(name="testIndv", investigation_id=invId)`[[BR]] 35 `add.marker(name="testMarker2", cm="11.3", bpstart="456237", investigation_id=invId)` 36 37 === Add a completely new data matrix, including annotations === 38 19 39 `invId <- 0`[[BR]] 20 40 `data <- NULL`[[BR]] … … 27 47 `colnames(data) <- c("myInd1", "myInd2")`[[BR]] 28 48 `rownames(data) <- c("myMarker1", "myMarker2")`[[BR]] 29 `add.datamatrix(data, name="myResults", investigation_id=invId, rowtype="Marker", coltype="Individual", valuetype="Text")` [[BR]]49 `add.datamatrix(data, name="myResults", investigation_id=invId, rowtype="Marker", coltype="Individual", valuetype="Text")` 30 50 31 51 === Upload a file === 52 32 53 `uri <- paste(dbpath,"/uploadfile",sep="")`[[BR]] 33 54 `path <- "testimage.png"`[[BR]] 34 55 `postForm(uri,investigation_name=investigationname, name="my_image", type="InvestigationFile", file=fileUpload(filename=path), style='HTTPPOST')` 56 57 == Automized xQTL analysis == 58 59 === Get a parameter from server === 60 61 `size <- getparameter("size",jobparams)` 62 63 === Do a status update === 64 65 `report(2,"Loading 5%...")` 66 67 68 69