API documentation

Example of Ruby code using the Mechanize gem


require 'mechanize'

browser = Mechanize.new
browser.post('https://gecftools.epfl.ch/getprime/primers/search', {
                      "ensembl_version" => 81,
                      "identifiers" => 'mdm1',
                      "limit" => 2, ## max authorized is 1000
                      "organism_id" => 5,
                      "format" => 'json'
                    }, {})
### save the data in a file named test.json
browser.page().save 'test.json'

Result ('test.json' file)


[{
  "id":2111399,"gene_id":"ENSG00000111554","gene_name":"MDM1","transcript_id":"ENST00000357874",
  "transcript_ids":"ENST00000357874","nber_transcripts":1,"nber_known_transcripts":15,
  "amplicon_length":60,"warning_ids":"3","chr":"12",
  "fwd_start":68295292,"fwd_stop":68295310,"fwd_strand":false,"fwd_type_def_ids":"2",
  "fwd_seq":"TTTCAAACTCTGGCACGAG","fwd_tm":58,
  "rev_start":68280741,"rev_stop":68295269,"rev_strand":true,"rev_type_def_ids":"1",
  "rev_seq":"CCTCAGTTTCCTCATCCCAG","rev_tm":60,
  "organism_id":5,"transcript_specific":0,"rank":2,
  "fwd_nber_snps":5,"rev_nber_snps":2,
  "downstream_nber_snps":5,"upstream_nber_snps":2,
  "fwd_nber_snps_nr":5,"rev_nber_snps_nr":2,"upstream_nber_snps_nr":2,"downstream_nber_snps_nr":5,
  "mapping":null,"fwd_exon_regions":"0,19","rev_exon_regions":"0,15,14524,14529","protein_coding":true,
  "nber_snps":null,"organism_name":"Homo sapiens","ensembl_version":81,"novel":false
 },{
  "id":2111396,"gene_id":"ENSG00000111554","gene_name":"MDM1","transcript_id":"ENST00000545964",
  "transcript_ids":"ENST00000540418,ENST00000303145,ENST00000411698,ENST00000545964","nber_transcripts":4,"nber_known_transcripts":15,
  "amplicon_length":80,"warning_ids":null,"chr":"12",
  "fwd_start":68316121,"fwd_stop":68316139,"fwd_strand":false,"fwd_type_def_ids":"2",
  "fwd_seq":"TCCTCAACCACAAGCTCAG","fwd_tm":60,
  "rev_start":68315247,"rev_stop":68316080,"rev_strand":true,"rev_type_def_ids":"1",
  "rev_seq":"CTTATGGCTTGTAGGATCTCCA","rev_tm":60,
  "organism_id":5,"transcript_specific":0,"rank":2,
  "fwd_nber_snps":3,"rev_nber_snps":8,"downstream_nber_snps":3,"upstream_nber_snps":8,
  "fwd_nber_snps_nr":3,"rev_nber_snps_nr":8,"upstream_nber_snps_nr":8,"downstream_nber_snps_nr":3,
  "mapping":null,"fwd_exon_regions":"0,19","rev_exon_regions":"0,19,831,834","protein_coding":true,
  "nber_snps":null,"organism_name":"Homo sapiens","ensembl_version":81,"novel":false
}]