Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Avoiding errors for missing files #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions genomics/4-Variation/fetch_sra_acc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ curl -s 'https://www.ebi.ac.uk/ena/browser/api/xml/links/taxon?accession=2697049

cat ena.txt genbank.txt sra.txt | sort | uniq > union.txt
rm ena.txt

if [ ! -f acc2exclude.txt ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you can just do touch without the if as touch only updates the access times.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Didn't think about it. Shall I do a new PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you can do it here directly ...

then
touch acc2exclude.txt;
fi

grep -f acc2exclude.txt -v union.txt > current.txt

# Annotate combined accession with metadata
Expand Down