API-Docs

Field Design API

AgriOS Field Design API

URL

http://your.server.com/ocpu/library/AgriOS/R/design_exp

Request Method

curl http://your.server.com/ocpu/library/AgriOS/R/design_exp -d”parameters”

Parameters of field design API

Parameters Field Design

Name

Meaning

Description

Required

Default

data

input file path

true

NULL

design

design name

true

NULL

reps

number of reps

Valid and mandatory for “crd”, “contrast”, “interval_contrast”

true/false

NULL

blocks

number of blocks

Valid and mandatory for “rcbd”, “augmented”, “split-plot”

true/false

NULL

block.size

size of incomplete block

Valid and mandatory for “alpha”

true/false

NULL

nrows

number of rows

Maximum number of rows (ranges) of the experiment field

true

NULL

ncols

number of cols

Maximum number of cols (pass) of the experiment field

true

NULL

seed

random seed

Valid for all design except for “contrast” and “interval_contrast”

false

NULL

interval

interval size

Valid and mandatory for “interval_contrast”

true/false

NULL

filler.interval

filling method

Valid and mandatory for “interval_contrast”. Indicate if empty plots at the end of each interval should be filled by “interval_contrast” fillers. If false, the allocation of next rep will continue from the empty plots of the previous interval.

false

true

filler

name of filler

Valid for “interval_contrast”

false

FILLER_No_Name

trt.wp

list of whole-plot treatments

Valid and mandatory for “split-plot”

true

none

trt.sp

list of split-plot treatments

Valid and mandatory for “split-plot”

true

none

loc_id

id of location

false

“”

exp_id

id of experiment

false

“”

as.json

output format

If the output should be written in json or r data.frame

false

false

log.path

a path for saving the log file

If the path is not specified, log messages will be printed in the console

false

NULL

Example input data of field design

[
  {
    "ped_id": "G1",
    "sub_group": 1,
    "design_check": 0
  },
  {
    "ped_id": "G2",
    "sub_group": 1,
    "design_check": 0
  },
  {
    "ped_id": "G3",
    "sub_group": 1,
    "design_check": 0
  },
  {
    "ped_id": "G4",
    "sub_group": 1,
    "design_check": 0
  },
  {
    "ped_id": "G5",
    "sub_group": 1,
    "design_check": 0
  },
  {
    "ped_id": "G6",
    "sub_group": 1,
    "design_check": 0
  },

Showcase of field design usage

Field design of diagonal augmented trials

curl http://your.server.com/ocpu/library/AgriOS/R/design_exp \
-d "data=home/root/Data/entries-diagonal.json&design='diagonal'&nrows=18&ncols=18&as.json=true"

Field design of randomized complete block design

curl http://your.server.com/ocpu/library/AgriOS/R/design_exp \
-d "data=home/root/Data/entries-rcbd.json&design='rcbd'&blocks=3&nrows=7&ncols=10&as.json=true"

Data Analysis API

AgriOS Field Data Analysis API

Variable

Meaning

Description

ped_id

genotype id

identity of the genotypes to be planted;

sub_group

number of subgroup

Divide the field into subgroups; this is only valid for diagonal design for now;

design_check

if a genotype is check

indicate checks for certain designs; the values can be either 0 (not check) or 1 (check);

Parameters of field design API

Parameters Data Analysis

Name

Meaning

Description

Required

Default

file

path to input data

for the format of this file please see the table below

true

NULL

design

name of design

a string to specify the type of design please see field design for more information

true

NULL

log.path

a path for saving the log file

If the path is not specified, log messages will be printed in the console

false

NULL

as.json

output format

If the output should be written in json or r data.frame

false

false

Structure of Input File for Data Analysis

Variable

Meaning

Description

Required

num

data entry number

number of row of the input data entry

true

loc_id

location id

identity of the trial location

true

year

year of trial

year during which the trial was harvested

false

env_id

environment id

identity of the trial environment

false

pass

column of the plot

column coordination of the plot on field

false

ranges

row of field the plot

row coordination of the plot on field

false

block

block of the plot

block number of the plot (only valid for certain designs)

false

rep_num

rep of the plot

replication number of the plot

true

entry_id

entry id

id of the entry

true

plot_id

plot_id

id of the plot

true

treatment

agronomic treatment 1

agronomic treatment 1

false

treatment2

agronomic treatment 2

agronomic treatment 2

false

treatment3

agronomic treatment 3

agronomic treatment 3

false

ped_id

id of the genotype

Id of the genotype of the plot

true

female_ped_name

name of mather line

for GCA analysis

false

male_ped_name

name of father line

for GCA analysis

false

check_type

indicator of check plots

Value can be 1, 2, 3, or 4;

false

value

value of observation

value of the trait observation

true

trait

trait id

Id of the trait

true

Output of analysis of contrast design

Output of Contrast Design Analysis

FUN_TYPE

MAP_FUN_ID

DESRIPTION

指标名称

指标类型

是否常用

数据类型

ConExp

CHECK_MEAN_EXP

The mean of CHECK_VALUE for the experiment

对照平均(对比)

试验总结

decimal(18,2)

ConExp

DIFF_CHECK_EXP

The mean of DIFFERENCE_CHECK for the experment

与对照差异(对比)

试验总结

decimal(18,2)

ConExp

PCT_CHECK_EXP

The mean of PCT_CHECK for the experiment

与对照差异百分比(对比)

试验总结

decimal(18,2)

ConLoc

CHECK_MEAN_LOC

The mean of CHECK_VALUE for the location

对照平均(对比)

试点总结

decimal(18,2)

ConLoc

DIFF_CHECK_LOC

The mean of DIFFERENCE_CHECK for the location

与对照差异(对比)

试点总结

decimal(18,2)

ConLoc

PCT_CHECK_LOC

The mean of PCT_CHECK for the location

与对照差异百分比(对比)

试点总结

decimal(18,2)

ConPlot

CHECK_VALUE

The check value for the plot

对照值(对比)

小区总结

decimal(18,2)

ConPlot

DIFFERENCE_CHECK

The difference between genotype plot and check plot

与对照差异(对比)

小区总结

decimal(18,2)

ConPlot

PCT_CHECK

The percentage of DIFF_CHECK_EXP

与对照差异百分比(对比)

小区总结

decimal(18,2)

Output of analysis of interval contrast design

Output of Interval Contrast Design Analysis

FUN_TYPE

MAP_FUN_ID

DESRIPTION

指标名称

指标类型

是否常用

数据类型

ConPlotSummary

VALUE

Genotype value of the plot

观察值(间比)

小区总结

decimal(18,2)

ConPlotSummary

CK_BEFORE

check value before the plot

前侧对照值(间比)

小区总结

decimal(18,2)

ConPlotSummary

CK_AFTER

check value before the plot

后侧对照值(间比)

小区总结

decimal(18,2)

ConPlotSummary

CK_SUM

Sum of the checks on both sides of the plot

对照加和(间比)

小区总结

decimal(18,2)

ConPlotSummary

CK_MEAN

Mean of the checks on both sides of the plot

对照平均(间比)

小区总结

decimal(18,2)

ConPlotSummary

PED_DIFF

Difference between VALUE and CK_MEAN

与对照差异(间比)

小区总结

decimal(18,2)

ConPlotSummary

PED_PCT

Percentage of PED_DIFF on the CK_MEAN

与对照差异百分比(间比)

小区总结

decimal(18,2)

ConPlotSummary

CK_NAME

ped_id of the ck

对照名称(间比)

小区总结

varchar(256)

ConSummary

CK_MEAN_LOC

Mean of the CK_MEAN of the location

对照平均(间比)

试点总结

decimal(18,2)

ConSummary

PED_DIFF_LOC

Mean of the PED_DIFF of the location

与对照差异(间比)

试点总结

decimal(18,2)

ConSummary

PED_PCT_LOC

Mean of the PED_PCT of the location

与对照差异百分比(间比)

试点总结

decimal(18,2)

ConSummary

CK_MEAN_EXP

Mean of the CK_MEAN of the experiment

对照平均(间比)

试验总结

decimal(18,2)

ConSummary

PED_DIFF_EXP

Mean of the PED_DIFF of the experiment

与对照差异(间比)

试验总结

decimal(18,2)

ConSummary

PED_PCT_EXP

Mean of the PED_PCT of the experiment

与对照差异百分比(间比)

试验总结

decimal(18,2)

ConSummary

CK_NAME

ped_id of the ck

对照名称(间比)

试验总结、试验总结

varchar(256)

Showcase of data analysis usage

# Analysis of randomized design trials
curl http://your.server.com/ocpu/library/AgriOS/R/fd_analysis \
-d "file='home/root/Data/besag.json'&design='rcbd'&log.path='/your/log/path'&as.json=true"
curl http://180.184.76.202:8080/ocpu/library/AgriOS/R/fd_analysis \
-d "file='/home/root/Data/data_contrast.json'&design='contrast'&as.json=true"
curl http://180.184.76.202:8080/ocpu/library/AgriOS/R/fd_analysis \
-d "file='/home/root/Data/data_contrast.json'&design='interval_contrast'&as.json=true"