Exemplo n.º 1
0
        for f,rname in jobfiles[job.attrib['protocol']]:
          resource_file = os.path.join(jdir,f)
          if os.path.exists(resource_file):
            pool_resources.append((resource_file,'%s_%s' % (job.attrib['protocol'],rname)))
      igvfile = os.path.join(resultdir,'%s.igv.xml' % pool.attrib['name'])
      with open(igvfile,'w') as outh:
        print >>outh, igv_xml(refurl,pool_resources)
      igvurls[pool.attrib['name']] = igvfile


    #--- Summarize calls
    calltable = merge_calls(analysis,reflens,poollist)
    bestbets = best_calls(calltable)

    #--- Create the excel file
    excelfile = os.path.join(resultdir,'%s.xlsx' % analysis.attrib['name'])
    create_result_workbook(refnames, poollist, calltable, bestbets, excelfile)
    
    #--- Make the index.html file
    htmlfile = os.path.join(adir,'index.html')
    with open(htmlfile,'w') as outh:
      print >>outh, make_index(analysis,'localhost',reflens,calltable,bestbets)

  except (IOError,OSError) as e:
    if e.args[1] == 'Read-only file system':
      sys.exit('Destination "%s" is mounted as read-only.' % args.destination)
    else: raise
  finally:
    os.umask(omask)

Exemplo n.º 2
0
            ## generate the igv.xml file for each pool
            igvfile = os.path.join(resultdir,'%s.igv.xml' % pool.attrib['name'])
            with open(igvfile,'w') as outh:
                print >>outh, igv_xml(refurl,pool_resources)
            
        igvurls[pool.attrib['name']] = alias_filename(igvfile)

        #--- Summarize calls
        calltable = merge_calls(analysis,reflens,poollist)
        bestbets = best_calls(calltable)

###################
        #--- Create the excel file
        excelfile = os.path.join(resultdir,'%s.xlsx' % analysis.attrib['name'])
        create_result_workbook(refnames,poollist,calltable,bestbets,excelfile)
###################
    
        #--- Make the index.html file
        htmlfile = os.path.join(adir,'index.html')
        with open(htmlfile,'w') as outh:
            print >>outh, make_index(analysis,URLPATH,reflens,calltable,bestbets)

    except (IOError,OSError) as e:
        if e.args[1] == 'Read-only file system':
            sys.exit('Destination "%s" is mounted as read-only.' % args.destination)
        else: raise
  
    finally:
        os.umask(omask)

Exemplo n.º 3
0
        igvurls[pool.attrib['name']] = alias_filename(igvfile)

        #--- Summarize calls
        calltable = merge_calls(analysis, reflens, poollist)
        bestbets = best_calls(calltable)

        ###################
        #--- Create the excel file
        excelfile = os.path.join(resultdir,
                                 '%s.xlsx' % analysis.attrib['name'])
        create_result_workbook(refnames, poollist, calltable, bestbets,
                               excelfile)
        ###################

        #--- Make the index.html file
        htmlfile = os.path.join(adir, 'index.html')
        with open(htmlfile, 'w') as outh:
            print >> outh, make_index(analysis, URLPATH, reflens, calltable,
                                      bestbets)

    except (IOError, OSError) as e:
        if e.args[1] == 'Read-only file system':
            sys.exit('Destination "%s" is mounted as read-only.' %
                     args.destination)
        else:
            raise

    finally:
        os.umask(omask)