-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement download tracker and pipeline execution change #24
Merged
Merged
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ae80866
Added batch monitor patch and updated interface
danich1 e924e0c
Update README.md to reflect new changes
danich1 1278a27
Created README.md for configuration files
danich1 781a4a4
Updated files for ease of readability
danich1 1d4857a
Merge branch 'download_tracker' of github.com:danich1/pubtator into d…
danich1 ff61ed3
fixed execute.py
danich1 2746b8d
file name change
danich1 7842f2e
Applying Jake's suggestions from code review
danich1 c46d6a3
Added documentation and made changes per jjc2718 suggestions
danich1 d87c64f
Fixed anchors for read me
danich1 304eec3
Finalized config readme
danich1 0c5575d
No really this config.md is finalized now.
danich1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,38 @@ | ||
# Configuration Files | ||
|
||
## File Description | ||
|
||
| File | Description | | ||
| --- | --- | | ||
| [pubtator central config](pubtator_central_config.json) | This is a configuration file for parsing Pubtator Central. | | ||
| [pubtator config](pubtator_config.json) | This is a configuration file for parsing Pubtator (older version of Pubtator Central). | | ||
| [tests config](tests_config.json) | This is a configuration file for testing the pubtator system. Feel free to ignore this file. | | ||
|
||
## Usage | ||
|
||
Each configuration file is in json format and contains parameters for each step within the pubtator pipeline. | ||
All files are organized by order of operation, which means the very first step occurs at the top and the subsequent step comes right afterwards. | ||
Every step can be skipped, which allows one to continue the pipeline at any step they choose. | ||
To skip a step just replace the skip field with true instead of false. | ||
**Note: make sure true is lowercase as json requires it to be lowercase.** | ||
|
||
Example: | ||
```json | ||
{ | ||
"pipieline step 1":{ | ||
"param1":"param1_value", | ||
"param2":"param2_value", | ||
"skip":false | ||
}, | ||
"pipieline step 2":{ | ||
"param1":"param1_value", | ||
"param2":"param2_value", | ||
"skip":false | ||
}, | ||
"pipieline step 3":{ | ||
danich1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"param1":"param1_value", | ||
"param2":"param2_value", | ||
"skip":false | ||
} | ||
} | ||
``` |
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,54 @@ | ||
{ | ||
"repository_download":{ | ||
"url":"ftp://ftp.ncbi.nlm.nih.gov/pub/lu/PubTatorCentral/bioconcepts2pubtatorcentral.offset.gz", | ||
"download_folder":"download", | ||
"skip":false | ||
}, | ||
|
||
"pubtator_to_xml": { | ||
"documents":"download/bioconcepts2pubtatorcentral.offset.gz", | ||
"output":"data/pubtator-central-docs.xml.xz", | ||
"skip":false | ||
}, | ||
|
||
"extract_tags":{ | ||
"input":"data/pubtator-central-docs.xml.xz", | ||
"output":"data/pubtator-central-tags.tsv.xz", | ||
"skip":false | ||
}, | ||
|
||
"hetnet_id_extractor":{ | ||
"input":"data/pubtator-central-tags.tsv.xz", | ||
"output":"data/pubtator-central-hetnet-tags.tsv.xz", | ||
"skip":false | ||
}, | ||
|
||
"map_pmid_to_pmcids":{ | ||
"input":"data/pubtator-central-tags.tsv.xz", | ||
"output":"data/pubtator-pmids-to-pmcids.tsv", | ||
"debug":false, | ||
"skip":false | ||
}, | ||
|
||
"download_full_text":{ | ||
"input":"data/pubtator-pmids-to-pmcids.tsv", | ||
"document_batch":100, | ||
"output":" data/pubtator-central-full-text.xml", | ||
"temp_dir":"data/temp", | ||
"log_file":"batch_log.tsv", | ||
"skip":false | ||
}, | ||
|
||
"extract_full_text_tags":{ | ||
"input":"data/pubtator-central-full-text.xml", | ||
"output":"data/pubtator-central-full-text-tags.tsv.xz", | ||
"skip":false | ||
}, | ||
|
||
"hetnet_id_extractor_full_text":{ | ||
"input":"data/pubtator-central-full-text-tags.tsv.xz", | ||
"output":"data/pubtator-central-full-hetnet-tags.tsv.xz", | ||
"skip":false | ||
} | ||
|
||
} |
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,25 @@ | ||
{ | ||
"repository_download":{ | ||
"url":"ftp://ftp.ncbi.nlm.nih.gov/pub/lu/PubTator/bioconcepts2pubtator_offsets.gz", | ||
"download_folder":"download", | ||
"skip":false | ||
}, | ||
|
||
"pubtator_to_xml": { | ||
"documents":"download/bioconcepts2pubtator_offsets.gz", | ||
"output":"data/pubtator-docs.xml.xz", | ||
"skip":false | ||
}, | ||
|
||
"extract_tags":{ | ||
"input":"data/pubtator-docs.xml.xz", | ||
"output":"data/pubtator-tags.tsv.xz", | ||
"skip":false | ||
}, | ||
|
||
"hetnet_id_extractor":{ | ||
"input":"data/pubtator-tags.tsv.xz", | ||
"output":"data/pubtator-hetnet-tags.tsv.xz", | ||
"skip":false | ||
} | ||
} |
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,54 @@ | ||
{ | ||
"repository_download":{ | ||
"url":"ftp://ftp.ncbi.nlm.nih.gov/pub/lu/PubTatorCentral/bioconcepts2pubtatorcentral.offset.gz", | ||
"download_folder":"download", | ||
"skip":true | ||
}, | ||
|
||
"pubtator_to_xml": { | ||
"documents":"data/example/1-sample-annotations.txt", | ||
"output":"data/example/2-sample-docs.xml", | ||
"skip":false | ||
}, | ||
|
||
"extract_tags":{ | ||
"input":"data/example/2-sample-docs.xml", | ||
"output":"data/example/3-sample-tags.tsv", | ||
"skip":false | ||
}, | ||
|
||
"hetnet_id_extractor":{ | ||
"input":"data/example/3-sample-tags.tsv", | ||
"output":"data/example/4-hetnet-tags.tsv", | ||
"skip":false | ||
}, | ||
|
||
"map_pmid_to_pmcids":{ | ||
"input":"data/example/3-sample-tags.tsv", | ||
"output":"data/example/5-sample-pmids-to-pmcids.tsv", | ||
"debug":true, | ||
"skip":false | ||
}, | ||
|
||
"download_full_text":{ | ||
"input":"data/example/5-sample-pmids-to-pmcids.tsv", | ||
"document_batch":100, | ||
"output":"data/example/6-sample-full-text.xml", | ||
"temp_dir":"data/temp", | ||
"log_file":"batch_log.tsv", | ||
"skip":false | ||
}, | ||
|
||
"extract_full_text_tags":{ | ||
"input":"data/example/6-sample-full-text.xml", | ||
"output":"data/example/7-sample-full-text-tags.tsv", | ||
"skip":false | ||
}, | ||
|
||
"hetnet_id_extractor_full_text":{ | ||
"input":"data/example/7-sample-full-text-tags.tsv", | ||
"output":"data/example/8-hetnet-full-text-tags.tsv", | ||
"skip":false | ||
} | ||
|
||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I understand the purpose of these config files - you don't expect users to add or remove fields, correct? They would just change the fields if necessary (for example setting
skip:true
or changing the output filenames)?Just wondering if you need to document what each of the fields mean somewhere. Most of them are fairly obvious from the name, so I think it's probably not necessary but if you expect users to be changing things by hand a lot I might feel differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The idea is to provide the fields already, so a user can change directories as needed.
Good idea. I'll add documentation to this PR.