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

Add file's last modified date to the new gff filename

parent 658773c7
No related branches found
No related tags found
2 merge requests!9Release 2.0 (merge dev to master),!8Release 2.0
This commit is part of merge request !9. Comments created here will be created in the context of that merge request.
......@@ -91,6 +91,12 @@ class GetData(speciesData.SpeciesData):
logging.info("src_data directory tree generated for %s" % self.full_name)
def get_last_modified_time_string(self, filePath):
# give the last modification date for the file, with format '20190130'
lastModifiedTimestamp = os.path.getmtime(filePath)
lastModifiedTimeStructure = time.localtime(lastModifiedTimestamp)
lastModifiedDate = time.strftime("%Y%m%d", lastModifiedTimeStructure)
return lastModifiedDate
def get_source_data_files_from_path(self):
"""
......@@ -137,7 +143,7 @@ class GetData(speciesData.SpeciesData):
elif k in annotation_datasets:
dataset_fname = ""
if k == "gff_path":
dataset_fname = "{0}_OGS{1}.gff".format(self.dataset_prefix, self.ogs_version)
dataset_fname = "{0}_OGS{1}_{2}.gff".format(self.dataset_prefix, self.ogs_version, self.get_last_modified_time_string(os.path.abspath(v)))
elif k == "transcripts_path":
dataset_fname = "{0}_OGS{1}_transcripts.fasta".format(self.dataset_prefix, self.ogs_version)
elif k == "proteins_path":
......
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