-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
############################################################ | ||
# Dockerfile to build a container that pulls KN subnetworks | ||
############################################################ | ||
|
||
# Set the base image to python v3 | ||
FROM python:3.4-slim | ||
|
||
# File Author / Maintainer | ||
MAINTAINER Charles Blatti <[email protected]> | ||
|
||
# Update the repository sources list | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
time \ | ||
rsync \ | ||
wget \ | ||
s3cmd \ | ||
python3-pip | ||
|
||
RUN pip3 install awscli | ||
RUN wget -O /home/credentials http://knowcloud.cse.illinois.edu/index.php/s/E3OL5QpTj8SrOix/download | ||
COPY kn_fetcher.sh /home/ | ||
RUN chmod 775 /home/kn_fetcher.sh | ||
|
||
|
||
# Set default contain command on run | ||
CMD /bin/bash | ||
|
||
# Set container execution behavior | ||
# ENTRYPOINT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.0 | ||
id: "kn_fetcher" | ||
label: "Knowledge Network Fetcher" | ||
doc: "Retrieve appropriate subnetwork from KnowEnG Knowledge Network from AWS S3 storage" | ||
|
||
#dct:creator: | ||
# "@id": "http://orcid.org/0000-0002-4683-6271" | ||
# foaf:name: Charles Blatti | ||
# foaf:mbox: "mailto:[email protected]" | ||
|
||
requirements: | ||
- class: DockerRequirement | ||
dockerPull: "quay.io/cblatti3/kn_fetcher:0.1" | ||
- class: InlineJavascriptRequirement | ||
|
||
hints: | ||
- class: ResourceRequirement | ||
coresMin: 1 | ||
ramMin: 1024 #"the process requires at least 1G of RAM | ||
outdirMin: 512000 | ||
|
||
inputs: | ||
- id: bucket | ||
label: "AWS S3 Bucket Name" | ||
doc: "the aws s3 bucket" | ||
type: string | ||
default: "KnowNets/KN-6rep-1611/userKN-6rep-1611" | ||
inputBinding: | ||
position: 1 | ||
- id: network_type | ||
label: "Subnetwork Class" | ||
doc: "the type of subnetwork" | ||
type: string | ||
default: Gene | ||
inputBinding: | ||
position: 2 | ||
- id: taxon | ||
label: "Subnetwork Species ID" | ||
doc: "the taxonomic id for the species of interest" | ||
type: string | ||
default: "9606" | ||
inputBinding: | ||
position: 3 | ||
- id: edge_type | ||
label: "Subnetwork Edge Type" | ||
doc: "the edge type keyword for the subnetwork of interest" | ||
type: string | ||
default: PPI_physical_association | ||
inputBinding: | ||
position: 4 | ||
|
||
baseCommand: /home/kn_fetcher.sh | ||
|
||
outputs: | ||
- id: output_file | ||
label: "Subnetwork Edge File" | ||
doc: "4 column format for subnetwork for single edge type and species" | ||
outputBinding: | ||
glob: "*.edge" | ||
type: File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
network_type: "Gene" | ||
taxon: "9606" | ||
edge_type: "STRING_textmining" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
BUCKET=$1 | ||
NETWORKTYPE=$2 | ||
TAXON=$3 | ||
EDGETYPE=$4 | ||
MYCMD="mkdir -p ~/.aws/ && cp /home/credentials ~/.aws/ && aws s3 cp s3://$BUCKET/$NETWORKTYPE/$TAXON/$EDGETYPE/ ./ --recursive" | ||
echo $MYCMD | ||
eval $MYCMD |