Skip to content
Snippets Groups Projects
Commit 91c3500d authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

Remove unused imports. Update Readme. Factorize goto_species_dir()

parent 28a1d904
No related branches found
No related tags found
2 merge requests!10Release 2.0,!9Release 2.0 (merge dev to master)
......@@ -149,8 +149,9 @@ Directory tree structure:
[BSD 3-Clause](./LICENSE)
## Acknowledgments
## Contributors
[Anthony Bretaudeau](https://github.com/abretaud)
[Matéo Boudet](https://github.com/mboudet)
\ No newline at end of file
- [Matéo Boudet](https://github.com/mboudet)
- [Anthony Bretaudeau](https://github.com/abretaud)
- [Loraine Brillet-Guéguen](https://github.com/loraine-gueguen)
- [Arthur Le Bars](https://gitlab.com/Troubardours)
\ No newline at end of file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import bioblend
import argparse
import os
import subprocess
import logging
import sys
import fnmatch
import time
import json
import re
import stat
import shutil
from bioblend.galaxy.objects import GalaxyInstance
from bioblend import galaxy
import utilities
import speciesData
......@@ -36,24 +27,6 @@ class GetData(speciesData.SpeciesData):
"""
def goto_species_dir(self):
"""
Go to the species directory (starting from the main dir)
:return:
"""
os.chdir(self.main_dir)
species_dir = os.path.join(self.main_dir, self.genus_species) + "/"
try:
os.chdir(species_dir)
except OSError:
logging.critical("Cannot access %s" % species_dir)
sys.exit(0)
return 1
def make_directory_tree(self):
"""
Generate the directory tree for an organism
......
......@@ -11,7 +11,7 @@ import yaml
import shutil
from pathlib import Path
from jinja2 import Template, Environment, FileSystemLoader
from jinja2 import Environment, FileSystemLoader
import utilities
import speciesData
......
......@@ -4,6 +4,7 @@
import os
import sys
import utilities
import logging
from _datetime import datetime
......@@ -15,6 +16,22 @@ class SpeciesData:
"""
def goto_species_dir(self):
"""
Go to the species directory (starting from the main dir)
:return:
"""
os.chdir(self.main_dir)
species_dir = os.path.join(self.main_dir, self.genus_species) + "/"
try:
os.chdir(species_dir)
except OSError:
logging.critical("Cannot access %s" % species_dir)
sys.exit(0)
return 1
def clean_string(self, string):
if not string is None and string != "":
clean_string = string.replace(" ", "_").replace("-", "_").replace("(", "").replace(")", "").replace("'", "").strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment