Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPico authored Nov 21, 2023
1 parent eb61562 commit 7de37ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/generate-references/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ async function main () {

for (const pathway of pathways) {
//extract the WPID from the refs.tsv file
pathway = pathway.split('-')[0];
console.log('Processing pathway:', pathway)
const wpid = pathway.split('-')[0];
console.log('Processing pathway:', wpid)

const refsFile = path.join(PATHWAY_DIR, `${pathway}-refs.tsv`)
const refsFile = path.join(PATHWAY_DIR, `${wpid}-refs.tsv`)

if (!existsSync(refsFile)) {
console.log(` no ${pathway}-refs.tsv file, skipping`)
console.log(` no ${wpid}-refs.tsv file, skipping`)
continue
}

Expand Down Expand Up @@ -159,7 +159,7 @@ async function main () {
table.unshift(['ID', 'Database', 'Citation'])

await fs.writeFile(
getReferencesFile(pathway),
getReferencesFile(wpid),
table.map(row => row.join('\t')).join('\n') + '\n'
)
}
Expand Down

0 comments on commit 7de37ca

Please sign in to comment.