canc1993 / cheshire-gapfilling

MIT License
19 stars 5 forks source link

problem in read_paras.py #5

Open teisnotte opened 1 year ago

teisnotte commented 1 year ago

Hello there,

The rstrip function in python will delete any characters at the end with .xml or .csv, which is not preferable. The filename can be called gemll.xml which will give gem as after rstrip, it's the same for .csv.

    filenames_in_GEM_DIRECTORY = [f.rstrip('.xml') for f in os.listdir(paras['GEM_DIRECTORY']) if f.endswith('.xml')]
    filenames_in_GAPFILLED_RXNS_DIRECTORY = [
        f.rstrip('.csv') for f in os.listdir(paras["GAPFILLED_RXNS_DIRECTORY"]) if f.endswith('.csv')
    ]