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

Add necessary version updates and update wget_refseq for the proper work #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
68 changes: 61 additions & 7 deletions renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.0.3",
"Version": "4.1.2",
"Repositories": [
{
"Name": "CRAN",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"Matrix": {
"Package": "Matrix",
"Version": "1.2-18",
"Version": "1.6-5",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "08588806cba69f04797dab50627428ed"
Expand Down Expand Up @@ -67,7 +67,7 @@
},
"R6": {
"Package": "R6",
"Version": "2.5.0",
"Version": "2.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "b203113193e70978a696b2809525649d"
Expand Down Expand Up @@ -478,7 +478,7 @@
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.1",
"Version": "2.0.13,
"Source": "Repository",
"Repository": "CRAN",
"Hash": "41287f1ac7d28a92f0a286ed507928d3"
Expand Down Expand Up @@ -639,7 +639,7 @@
},
"rlang": {
"Package": "rlang",
"Version": "0.4.12",
"Version": "1.1.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5"
Expand Down Expand Up @@ -790,6 +790,60 @@
"Source": "Repository",
"Repository": "CRAN",
"Hash": "2826c5d9efb0a88f657c7a679c7106db"
}
},
"coin": {
"Package": "coin",
"Version": "1.4-3",
"Source": "Repository",
"Repository": "CRAN"
},
"infer": {
"Package": "infer",
"Version": "1.0.6",
"Source": "Repository",
"Repository": "CRAN"
},
"rstatix": {
"Package": "rstatix",
"Version": "0.7.2",
"Source": "Repository",
"Repository": "CRAN"
},
"forcats": {
"Package": "forcats",
"Version": "1.0.0",
"Source": "Repository",
"Repository": "CRAN"
},
"gt": {
"Package": "gt",
"Version": "0.10.1",
"Source": "Repository",
"Repository": "CRAN"
},
"PRROC": {
"Package": "PRROC",
"Version": "1.3.1",
"Source": "Repository",
"Repository": "CRAN"
},
"svglite": {
"Package": "svglite",
"Version": "2.1.3",
"Source": "Repository",
"Repository": "CRAN"
},
"viridis": {
"Package": "viridis",
"Version": "0.6.5",
"Source": "Repository",
"Repository": "CRAN"
},
"webshot": {
"Package": "webshot",
"Version": "0.5.5",
"Source": "Repository",
"Repository": "CRAN"
}
}
}
}
21 changes: 18 additions & 3 deletions src/refseq_wget_jobs/wget_refseq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ echo "CD'ing into $DIR"

cd $DIR

TARGET_DIR="../../data/refseq/$KINGDOM"

if [ ! -d "$TARGET_DIR" ]; then
mkdir -p "$TARGET_DIR"
fi

cd ../../data/refseq/$KINGDOM

echo "Getting assembly summary"
Expand All @@ -48,8 +54,17 @@ awk -F '\t' '{if($12=="Complete Genome") print $20}' assembly_summary.txt > asse

echo "Downloading genomes"

for next in $(cat assembly_summary_complete_genomes_$KINGDOM.txt); do
wget "$next"/*genomic.fna.gz
done
while IFS= read -r next; do
wget "$next" -O "$(basename "$next")_genomic"
while IFS= read -r line; do
link=$(echo "$line" | grep -oP '(?<=href=")[^"]+')

if [[ $link == *genomic.fna.gz && $link != *from_genomic.fna.gz ]]; then
wget "$next/$link"
gzip -d "$link"
fi
done < "$(basename "$next")_genomic"
rm "$(basename "$next")_genomic"
done < assembly_summary_complete_genomes_"$KINGDOM".txt

echo "Done."