Skip to content

Commit

Permalink
bug fix blast DB computation (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
HannahBioI authored Jun 15, 2022
1 parent b3663fc commit b1a25aa
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 8 deletions.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ dmypy.json
# Pyre type checker
.pyre/

# DS_store
**/.DS_Store
/fdog/.DS_Store
/fdog/data/.DS_Store
/fdog/bin/.DS_Store
/fdog/setup/.DS_Store

#Hannah
/fdog/data/core_orthologs/
/fdog/data/assembly_dir/
Expand Down
143 changes: 143 additions & 0 deletions fdog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# DS_store
**/.DS_Store
/fdog/.DS_Store
/fdog/data/.DS_Store
/fdog/bin/.DS_Store
/fdog/setup/.DS_Store

#Hannah
/fdog/data/core_orthologs/
/fdog/data/assembly_dir/
/fdog/fdog_goes_assembly/tmp/
taxdump*
/fdog/fDOGassembly.py
3 changes: 3 additions & 0 deletions fdog/fDOGassembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,9 @@ def ortholog_search_tblastn(args):
assembly_path = assemblyDir + "/" + asName + "/" + asName + ".fa"
db_path = assemblyDir + "/" + asName + "/blast_dir/" + asName + ".fa"
blast_dir_path = assemblyDir + "/" + asName + "/blast_dir/"
if not os.path.exists(blast_dir_path):
cmd = 'mkdir ' + blast_dir_path
starting_subprocess(cmd, 'silent')
db_check = searching_for_db(blast_dir_path)

if db_check == 0:
Expand Down
12 changes: 6 additions & 6 deletions fdog/runMulti.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def prepare(args, step):
return(basicArgs, ioArgs, pathArgs, coreArgs, orthoArgs, fasArgs, otherArgs, mute)

def getSeedName(seedFile):
seqName = seedFile.split('.')[0]
seqName = seedFile.rsplit('.', 1)[0]
seqName = re.sub('[\|\.]', '_', seqName)
return(seqName)

Expand Down Expand Up @@ -217,14 +217,11 @@ def createConfigPP(outpath, jobName, refspec):
settings['rank'] = 'species'
settings['refspec'] = refspec
settings['clusterProfile'] = 'TRUE'
print("HERER")
print(settings)
print('%s/%s.config.yml' % (outpath, jobName))
with open('%s/%s.config.yml' % (outpath, jobName), 'w') as configfile:
yaml.dump(settings, configfile, default_flow_style = False)

def main():
version = '0.0.51'
version = '0.0.52'
parser = argparse.ArgumentParser(description='You are running fdogs.run version ' + str(version) + '.')
parser.add_argument('--version', action='version', version=str(version))
required = parser.add_argument_group('Required arguments')
Expand Down Expand Up @@ -535,7 +532,10 @@ def main():
### join output
finalFa = joinOutputs(outpath, jobName, seeds, keep, silent)
else:
print("%s.extended.fa found in %s! If you want to re-run the ortholog search, please use --force option." % (jobName, outpath))
if append == True:
sys.exit("Currently the append option is not available. Please use fdog.run if you need this option!")
else:
sys.exit("%s.extended.fa found in %s! If you want to re-run the ortholog search, please use --force or --append option." % (jobName, outpath))
### calculate FAS scores
if fasoff == False:
if os.path.exists('%s/%s.phyloprofile' % (outpath, jobName)):
Expand Down
2 changes: 1 addition & 1 deletion fdog/runSingle.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def getTaxName(taxId):
return(name)

def main():
version = '0.0.51'
version = '0.0.52'
parser = argparse.ArgumentParser(description='You are running fdog.run version ' + str(version) + '.')
parser.add_argument('--version', action='version', version=str(version))
required = parser.add_argument_group('Required arguments')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="fdog",
version="0.0.51",
version="0.0.52",

python_requires='>=3.7.0',
description="Feature-aware Directed OrtholoG search tool",
Expand Down

0 comments on commit b1a25aa

Please sign in to comment.