Skip to content
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

download from protein database #7

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 18 additions & 1 deletion lib/bionode-ncbi.js
Expand Up @@ -403,7 +403,8 @@ function createFTPURL(db) {
var self = this
var parseURL = {
sra: sraURL,
assembly: assemblyURL
assembly: assemblyURL,
protein: proteinURL
}

parseURL[db]()
Expand All @@ -425,6 +426,22 @@ function createFTPURL(db) {
}
}

function proteinURL(){
'http://www.ncbi.nlm.nih.gov/protein/XP_009457936.1?report=fasta&log$=seqview&format=text'
var runs = obj.runs.Run
async.eachSeries(runs, printProteinURL, next)
function printProteinURL(run, cb) {
var acc = run.acc
var runURL = [
'http://www.ncbi.nlm.nih.gov/protein/',
obj.accessionversion,
'?report=fasta&log$=seqview&format=text'
].join('')
self.push({url: runURL, uid: obj.uid})
cb()
}
}

function assemblyURL() {
if (obj.meta.FtpSites) {
var ftpPath = obj.meta.FtpSites.FtpPath
Expand Down