Commit ea3b25ee authored by Rudel Fankep's avatar Rudel Fankep
Browse files

prepare

parent 6ff8ea1b
# psotdb
test3
subcommands für argparse
einzelne prameter zusammenbauen
#!/bin/bash
DOWNLOAD_DIR=$1
cd $DOWNLOAD_DIR
makeblastdb -dbtype prot -in ../dbx/uniprot_sprot.fasta
tar -czf sp_blast.tar.gz uniprot_sprot.*
rm uniprot_sprot*
cd -
\ No newline at end of file
#!/bin/bash
DOWNLOAD_DIR=$1
cd $DOWNLOAD_DIR
wget ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.fasta.gz
gunzip Pfam-A.fasta.gz
cd -
\ No newline at end of file
#!/bin/bash
DOWNLOAD_DIR=$1
cd $DOWNLOAD_DIR
wget ftp://ftp.uniprot.org/pub/databases/uniprot/knowledgebase/uniprot_sprot.fasta.gz
gunzip uniprot_sprot.fasta.gz
cd -
\ No newline at end of file
#!/bin/bash
DOWNLOAD_DIR=$1
cd $DOWNLOAD_DIR
ghostx db -i uniprot_sprot.fasta -o sp_ghost
tar -czf sp_gx.tar.gz sp_ghost*
rm uniprot_sprot*
rm sp_ghost*
cd -
\ No newline at end of file
#!/home/theia/conda/bin/python
import argparse
import subprocess
data={'swissprot':{'download':'./download_swissprot.sh','blast':'./blast_swissprot.sh','ghostx':'./ghostx_swissprot.sh'},'pfam':{'download':'./download_pfam.sh'}}
parser=argparse.ArgumentParser(description='Vorbereitung von Datenbanken für PSOT(lädt Daten herunter, wandelt die um und stellt die Daten den Rechnern zur Verfügung)',prog='psotdb')
parser.add_argument('-o','--option',dest='opt')
parser.add_argument('-b','--bank',dest='bank')
parser.add_argument('-t','--tool',dest='tool')
args=parser.parse_args()
print(args.opt)
if args.opt.lower()=='prepare':
file=subprocess.run([data[args.bank]['download'],'../dbx'])
if args.tool:
file_tool=subprocess.run([data[args.bank][args.tool],'../dbx'])
elif args.opt.lower()=='upload':
print('hochladen')
elif args.opt.lower()=='download':
print('herunterladen')
else:
print('geht nicht')
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment