mirror of
https://github.com/MillironX/sc2-sequencing.git
synced 2024-12-22 03:08:17 +00:00
Convert a ClearLabs fasta tarball on Linux
This commit is contained in:
parent
09c08c9de1
commit
7065e22ab3
1 changed files with 18 additions and 0 deletions
18
convert-fastas.sh
Executable file
18
convert-fastas.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Untars the ClearLabs bulk download and converts it to a single FASTA suitable
|
||||||
|
# for online sequence analyzers
|
||||||
|
|
||||||
|
# Pull in the tarball name
|
||||||
|
FASTAFILE=${1}
|
||||||
|
|
||||||
|
# Determine what the nasty name is
|
||||||
|
FASTANAME=$(basename -s .fastas.tar "$FASTAFILE")
|
||||||
|
|
||||||
|
# Make a new folder to put everything in
|
||||||
|
mkdir "$FASTANAME"
|
||||||
|
|
||||||
|
# Untar the tarball
|
||||||
|
tar -xf "$FASTAFILE" -C "$FASTANAME"
|
||||||
|
|
||||||
|
# Smash all of the FASTAs together into a single file
|
||||||
|
cat "$FASTANAME"/*.fasta > "$FASTANAME"/"$FASTANAME".fasta
|
Loading…
Reference in a new issue