Partek Flow Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This particular pipeline requires a bowtie index and an annotation model:

Image RemovedImage Added

The request to launch the pipeline needs to specify one resource ID for each input.

...

Code Block
wget -q -O - "http://localhost:8080/flow/api/v1/library_files/list${AUTHDETAILS}&assembly=hg19" |  python -m json.tool | gvim -

 

...

Code Block
[
    {
        "annotationModel": "",
        "assembly": "hg19",
        "description": "Reference sequence",
        "fileType": "Genome sequence",
        "id": 100
    },
    {
        "annotationModel": "",
        "assembly": "hg19",
        "description": "Cytoband",
        "fileType": "cytoBand.txt",
        "id": 101
    },
    {
        "annotationModel": "",
        "assembly": "hg19",
        "description": "Bowtie index",
        "fileType": "Bowtie Index",
        "id": 102
    },
    {
        "annotationModel": "hg19_refseq_15_05_07_v2",
        "assembly": "hg19",
        "description": "Annotation file: hg19_refseq_15_05_07_v2",
        "fileType": "Annotation model",
        "id": 103
    }
]

 

The pipeline can be launched in any project using RunPython.py

Code Block
languagebash
python RunPipeline.py  -v --server http://localhost:8080 --user admin --password $FLOW_TOKEN --project_id 0 --pipeline AlignAndQuantify --inputs 102,103,102 

This action will cause two tasks to start running:

...

Code Block
languagebash
python UploadSamples.py -v --server http://localhost:8080 --user admin --password $FLOW_TOKEN --files ~/sampleA.fastq.gz ~/sampleB.fastq.gz --project NewProject --pipeline AlignAndQuantify --inputs 102,103,102


Add a collaborator to a project

...

Monitor a folder and upload files as they are created

 

Code Block
languagebash
#!/bin/bash
inotifywait -m $PATH_TO_MONITOR -e create -e moved_to |
  while read path action file; do
      if [[ $file == *.fastq.gz ]]; then
              echo "Uploading $file"
              python UploadSamples.py -v --server $SERVER --user $USER --password $TOKEN --files $path/$file --project "$PROJECT" 
      fi
  done

Monitor the queue and send a notification if there are too many waiting tasks

...

Code Block
languagebash
#!/bin/bash
while true; do
      result=`python QueueStatistics.py --server $SERVER --user $USER --password $TOKEN --max_waiting $MAX_WAITING`
      if [ $? -eq 1 ]; then
              /usr/bin/notify-send $result
              exit 1
      fi
      sleep $INTERVAL
done

...