variables - How to modify a python script to call an external file during a batch process? -
i have long series of files need analyze, in batch, using python script, e.g.,:
all_transcriptomes.fasta ofas000003-ra_rbh.fasta ofas000101-ra_rbh.fasta ofas000115-ra_rbh.fasta ofas000119-ra_rbh.fasta
and on. need query each *rbh.fasta
against all_transcriptomes.fasta
.
here beginning section of script i'm using perform analysis (up specifying variables):
#!/usr/bin/env python usage = """this program entire reciprocal blast search. nomenclature follows: sequences vs sequences b blast search step 1 = seqs vs blast database of seqs b step 2 (this step) = seqs b vs blast database of seqs columns of results table must follows: column 1: query id column 2: query length column 3: subject id column 4: subject length column 5: bitscore column 6: e-value column 7 onwards can like. """ #import modules needed import subprocess #give information required print "\na program run full reciprocal blast program. \n\ if having problems, worth reading usage assumptions , lay out\n\n" #the inputs required follows:\n\n\ #\ #1. project name\n\n\ #\ #2. name of fasta files containing first [a] set of sequences (must in working folder)\n\n\ #\ #3. name of fasta files containing second [b] set of sequences (must in working folder)\n\n\ #\ #4. kind of blast search doing?\n\n\ #\ #5. e-value cut-off like?\n\n\" #get required inputs projectname = "project_name" seqsfastaa = "query_file_name.fasta" #seqsfastaa = "temp_seqs.fasta" seqsfastab = "all_transcriptomes.fasta" #seqsfastab = "temp_seqs.fasta" blasttype = "blastn" #blasttype = "blastn" evalue = "1e-20" #evalue = 1e-05
because of lack of python scripting experience, not know how can script call each ofas*.fasta
seqsfastaa
. projectname
same ofas*.fasta
file names, without .fasta
. can assist modifying script when called batch shell script?
Comments
Post a Comment