Skip to content

Perform Enrichment Analysis Programmatically

zouzhaonan edited this page Jan 24, 2024 · 1 revision

One can send an HTTP POST request to the backend server of ChIP-Atlas to run Enrichment Analysis programmatically. Once the server accepts the request, an enrichment analysis job is queued, and then generate the result file with the request ID.

List of POST parameters (all values must be a string):

  • format
    • fixed value: 'text'
  • result
    • fixed value: 'www'
  • genome
    • hg38 hg19
    • mm10 mm9
    • rn6
    • dm6 dm3
    • ce11 ce10
    • sacCer3
  • antigenClass
  • cellClass
  • threshold
    • 50
    • 100
    • 200
    • 500
  • typeA
    • bed
      • user input bed file
    • gene
      • user input gene list
  • bedAFile
    • content of user data, bed file or gene list
    • all whitespaces must be converted to _
  • typeB
    • rnd
      • random permutation
    • bed
      • user input bed file
    • refseq
      • Refseq coding genes excluding user data
    • userlist
      • user input gene list
  • bedBFile
    • content of compared data, bed file or gene list
    • put "empty" if the type B is rnd
    • all whitespaces must be converted to _
  • permTime
    • random permutation time, speciify 1 if the type B is bed or gene
    • options
      • 1
      • 10
      • 100
  • title
    • string
    • title of the analysis
  • descriptionA
    • string
    • description for the user data
  • descriptionB
    • string
    • description for the compared data
  • distanceUp
    • string
    • default: "0"
    • upper limit of distance from the TSS, default: 50
  • distanceDown
    • string
    • default: "0"
    • lower limit of distance from the TSS, default: 50

Here is an example command-line execution of the Enrichment Analysis using curl command. You can create a bed file by copy-and-paste the bed format data generated by the 'Try with example' button at the Enrichment Analysis web interface.

$ ls
dataA.bed
$ curl -X POST \
  -d "format=text" \
  -d "result=www" \
  -d "genome=hg19" \
  -d "antigenClass=TFs and others" \
  -d "cellClass=Pluripotent stem cell" \
  -d "threshold=50" \
  -d "typeA=bed" \
  --data-urlencode "bedAFile@dataA.bed" \
  -d "typeB=rnd" \
  -d "bedBFile=empty" \
  -d "permTime=10" \
  -d "title=10 times random permutation of my data" \
  -d "descriptionA=my data" \
  -d "descriptionB=random permutation 10 times" \
  -d "distanceUp=0" \
  -d "distanceDown=0" \
  https://ddbj.nig.ac.jp/wabi/chipatlas/

Then you will get a response including requestId to access the result looks like:

requestId: wabi_chipatlas_2020-0820-1357-35-297-993677
parameters: null
current-time: 2020-08-20 13:57:35
start-time:
current-state:

The job status can be retrieved from http://ddbj.nig.ac.jp/wabi/chipatlas/<requestId> (it takes < a minute when the job scheduler is busy).

Once the submitted job finished, the output will be accessible from https://ddbj.nig.ac.jp/wabi/chipatlas/<requestId>?info=result&format=html in HTML or https://ddbj.nig.ac.jp/wabi/chipatlas/<requestId>?info=result&format=tsv in TSV.

Clone this wiki locally