Skip to content

Commit

Permalink
Auto linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
StuntsPT committed Aug 25, 2017
1 parent 7f4b509 commit 9d2f57d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addTaxonToBlast/addTaxonToBlast.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ var taxonToAdd = process.argv[3]
// NCBI query function
var queryStream = through.obj(query)

function query(line, encoding, next) {
function query (line, encoding, next) {
uid = line.split('\t')[16]
ncbi.fetch('taxonomy', uid + '[uid]', (taxonomy) => {
try {
var taxons = taxonomy[0].TaxaSet.Taxon[0].LineageEx[0].Taxon
var taxClass = taxons.filter(t => t.Rank[0] === taxonToAdd)[0].ScientificName[0]
}
catch (error) {
} catch (error) {
var taxClass = 'NA'
}
this.push(line + '\t' + taxClass.toString() + '\n')
Expand Down

0 comments on commit 9d2f57d

Please sign in to comment.