# Path: xenoGI/parameters.py
# def createParametersD(baseParamStr,paramFN):
# def addParametersToD(paramL,paramD):
# def loadFileNameMapD(fileNameMapFN,genbankFileList=None):


import sys,os,shutil
from xenoGI import parameters

    call = 'twoBitInfo ' + subdir + '/' + igbStem + '.2bit ' + subdir + '/genome.txt'
    os.system(call)
    
    # copy over ncbi .gff file
    shutil.copy(ncbiDir+ncbiStem+'_genomic.gff',subdir+'/'+ncbiStem+'_genomic.gff')

    # make annots.xml file
    f=open(subdir+'/annots.xml','w')
    f.write(annotsString(humanStem,ncbiStem))
    f.close()
    
def annotsString(humanStem,ncbiStem):
    '''Return a string for the annots.xml file, with the proper file names
for the annotations inserted.'''

    a="""<files>
      <file name="""
    b="""	title="xenoGI annotations"
            description="Results from xenoGI annotation pipeline"
            load_hint="Whole Sequence"
            label_field="id"
            background="FFFFFF"
            foreground="000000"
            max_depth="10"
            name_size="12"
            show2tracks="false"/>
      <file name="""

    c="""	title="NCBI annotations"

# Path: xenoGI/parameters.py
# def createParametersD(baseParamStr,paramFN):
# def addParametersToD(paramL,paramD):
# def loadFileNameMapD(fileNameMapFN,genbankFileList=None):


# Path: misc/createIgbQuckloadDirs.py
import sys,os,shutil
from xenoGI import parameters


    call = 'twoBitInfo ' + subdir + '/' + igbStem + '.2bit ' + subdir + '/genome.txt'
    os.system(call)
    
    # copy over ncbi .gff file
    shutil.copy(ncbiDir+ncbiStem+'_genomic.gff',subdir+'/'+ncbiStem+'_genomic.gff')

    # make annots.xml file
    f=open(subdir+'/annots.xml','w')
    f.write(annotsString(humanStem,ncbiStem))
    f.close()
    
def annotsString(humanStem,ncbiStem):
    '''Return a string for the annots.xml file, with the proper file names
for the annotations inserted.'''

    a="""<files>
      <file name="""
    b="""	title="xenoGI annotations"
            description="Results from xenoGI annotation pipeline"
            load_hint="Whole Sequence"
            label_field="id"
            background="FFFFFF"
            foreground="000000"
            max_depth="10"
            name_size="12"
            show2tracks="false"/>
      <file name="""

    c="""	title="NCBI annotations"

            description="NCBI's annotations"