<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <h1>Create an experiment</h1>
Step1:  <h1>Get a list of mzML files that you uploaded and assign them to a group</h1>
Step2:  <h1>Specify the descriptive names for each group</h1>
Step3:  <h1>Steps in the file description and conversion process</h1>
<ul>
<li>upload mzml files</li>
<li>glob to get list of mzml files</li>
<li>for a homogenous set of mzml files make a single filespec object with </li>
metatlas_objects.FileSpec(polarity = ,group = inclus = )
<li>Call an experiment, e = metatlas_objects.Experiment(name = 'Test_20150722')</li>
<li>e.load_files(mzmlfiles,sp)</li>
<li>repeat this process for each homogeneous set of files</li>
<li>Alternative, you can specify your own filespec object for each file</li>
</ul>
Step4:  <h1>Convert All Your Files Manually</h1>
<h3>This is typically not performed because the "load_files" command above has already taken care of it</h3>
<ASSISTANT_TASK:>
Python Code:
myExperiment = metatlas_objects.Experiment(name = 'QExactive_Hilic_Pos_Actinobacteria_Phylogeny')
Explanation: <h1>Create an experiment</h1>
End of explanation
myPath = '/global/homes/b/bpb/ExoMetabolomic_Example_Data/'
myPath = '/project/projectdirs/metatlas/data_for_metatlas_2/20150324_LPSilva_BHedlund_chloroflexi_POS_rerun/'
myFiles = glob.glob('%s*.mzML'%myPath)
myFiles.sort()
groupID = []
for f in myFiles:
    groupID.append('')
i = 0
while i < len(myFiles):
    a,b = os.path.split(myFiles[i])
    j = raw_input('enter group id for %s [number, "x" to go back]:'%b)
    if j == 'x':
        i = i - 1
    else:
        groupID[i] = j
        i = i + 1
print groupID
uGroupID = sorted(set(groupID))
print uGroupID
Explanation: <h1>Get a list of mzML files that you uploaded and assign them to a group</h1>
End of explanation
uGroupName = []
for u in uGroupID:
    j = raw_input('enter group name for Group #%s: '%u)
    uGroupName.append(j)
Explanation: <h1>Specify the descriptive names for each group</h1>
End of explanation
fsList = []
for i,g in enumerate(groupID):
    for j,u in enumerate(uGroupID):
        if g == u:
            fs = metatlas_objects.FileSpec(polarity = 1,
                                          group = uGroupName[j],
                                          inclusion_order = i)
            fsList.append(fs)
            myExperiment.load_files([myFiles[i]],fs)
myExperiment.save()
print myExperiment.finfos[0].hdf_file
print myExperiment.finfos[0].group
print myExperiment.finfos[0].polarity
Explanation: <h1>Steps in the file description and conversion process</h1>
<ul>
<li>upload mzml files</li>
<li>glob to get list of mzml files</li>
<li>for a homogenous set of mzml files make a single filespec object with </li>
metatlas_objects.FileSpec(polarity = ,group = inclus = )
<li>Call an experiment, e = metatlas_objects.Experiment(name = 'Test_20150722')</li>
<li>e.load_files(mzmlfiles,sp)</li>
<li>repeat this process for each homogeneous set of files</li>
<li>Alternative, you can specify your own filespec object for each file</li>
</ul>
End of explanation
# myH5Files = []
# for f in myFiles:
#     metatlas.mzml_to_hdf('%s'%(f))
#     myH5Files.append(f.replace('.mzML','.h5'))
#     print f    
print len(myExperiment.finfos)
Explanation: <h1>Convert All Your Files Manually</h1>
<h3>This is typically not performed because the "load_files" command above has already taken care of it</h3>
End of explanation
<END_TASK>