Changes between Version 3 and Version 4 of xQTLBioinformaticianRCheatSheet


Ignore:
Timestamp:
2011-10-27T10:17:03+02:00 (13 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • xQTLBioinformaticianRCheatSheet

    v3 v4  
    33= [wiki:xQTL xQTL workbench] - Cheat sheet for R scripting =
    44
    5 === Get a parameter from server ===
    6 `size <- getparameter("size",jobparams)`
     5== Downloading ==
    76
    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")]`
    1018
    1119=== Get a simple overview of all data matrices ===
    12 `find.data()[,c("id","name")]`
    1320
    14 === Download a data matrix ===
     21`find.data()[,c("id","name","investigation","investigation_name")]`
     22
     23=== Retrieve a data matrix ===
     24
    1525`dataId <- 0`[[BR]]
    1626`data <- downloadmatrixascsvCURL(dataId)`
    1727
    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
    1939`invId <- 0`[[BR]]
    2040`data <- NULL`[[BR]]
     
    2747`colnames(data) <- c("myInd1", "myInd2")`[[BR]]
    2848`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")`
    3050
    3151=== Upload a file ===
     52
    3253`uri <- paste(dbpath,"/uploadfile",sep="")`[[BR]]
    3354`path <- "testimage.png"`[[BR]]
    3455`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