project_creator_3.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. def createProject(projectFolder, projectName, inputFasta):
  2. # Check if project folder exists
  3. if(not path.isdir(projectFolder)):
  4. os.mkdir(projectFolder)
  5. # Check if given project already exits
  6. projectFolderPath = os.path.join(projectFolder,projectName)
  7. if(path.isdir(projectFolderPath)):
  8. print("Project already exists, process aborted")
  9. return "EXIT"
  10. os.mkdir(projectFolderPath)
  11. # Create folder structure for annotation softwares
  12. os.mkdir(os.path.join(projectFolderPath,"tirvish"))
  13. os.mkdir(os.path.join(projectFolderPath,"tirvish_rc"))
  14. os.mkdir(os.path.join(projectFolderPath,"sinescan"))
  15. os.mkdir(os.path.join(projectFolderPath,"sinefind"))
  16. os.mkdir(os.path.join(projectFolderPath,"sinefind_rc"))
  17. os.mkdir(os.path.join(projectFolderPath,"repMasker"))
  18. os.mkdir(os.path.join(projectFolderPath,"repeatmodel"))
  19. os.mkdir(os.path.join(projectFolderPath,"must"))
  20. os.mkdir(os.path.join(projectFolderPath,"mitetracker"))
  21. os.mkdir(os.path.join(projectFolderPath,"mitetracker_rc"))
  22. os.mkdir(os.path.join(projectFolderPath,"mitefind"))
  23. os.mkdir(os.path.join(projectFolderPath,"mitefind_rc"))
  24. os.mkdir(os.path.join(projectFolderPath,"ltrPred"))
  25. os.mkdir(os.path.join(projectFolderPath,"ltrHarvest"))
  26. os.mkdir(os.path.join(projectFolderPath,"helitronScanner"))
  27. os.mkdir(os.path.join(projectFolderPath,"helitronScanner_rc"))
  28. os.mkdir(os.path.join(projectFolderPath,"transposonPSI"))
  29. os.mkdir(os.path.join(projectFolderPath,"NCBICDD1000"))
  30. os.mkdir(os.path.join(projectFolderPath,"parsedAnnotations"))
  31. os.mkdir(os.path.join(projectFolderPath,"transposonCandA"))
  32. os.mkdir(os.path.join(projectFolderPath,"transposonCandB"))
  33. os.mkdir(os.path.join(projectFolderPath,"transposonCandC"))
  34. os.mkdir(os.path.join(projectFolderPath,"transposonCandD"))
  35. os.mkdir(os.path.join(projectFolderPath,"transposonCandE"))
  36. os.mkdir(os.path.join(projectFolderPath,"transposonCandF"))
  37. os.mkdir(os.path.join(projectFolderPath,"finalResults"))
  38. # Copy DNA into folder
  39. copySequenceClean(inputFasta,projectFolderPath)
  40. #createProject("projects", "testProject", "G:/CambridgeGenData/GenSeq/RHIZIPHAGUS_IRR/rir17contigs.fasta")