ccgd-profile / BreaKmer

A method to identify structural variation from sequencing data in target regions
31 stars 11 forks source link

Why the requirement that the config file have no comment lines starting with # #17

Closed duartemolha closed 8 years ago

duartemolha commented 8 years ago

this seems like an odd limitation and very trivial to make your software ignore these lines

ryanabo commented 8 years ago

I believe that this is the current functionality. When the configuration file is parsed in the breakmer.params.py module there is logic in place to ignore these lines (see below). Do you have an instance where it is not ignored?

    for line in open(arguments.config_fn, 'rU'):
        line = line.strip()
        if line == '' or line.find('#') > -1:  # Allow for blank lines and comments
            continue
        linesplit = line.split("=")
        if len(linesplit) == 1:  # Make sure the lines in the configuration file are set properly.
            err_msg = 'Config line', line, ' not set correctly. Exiting.'
            print err_msg
            utils.log(self.loggingName, 'error', err_msg)
            sys.exit(1)
        else:
            key, value = linesplit
            self.set_param(key, value)  # Store key-value in opts dictionary.
duartemolha commented 8 years ago

I have not yet started to test your software... but if you go to your page: http://a-bioinformatician.github.io/BreaKmer/

you say:

Configuration file

A template configuration file with all the options is available, breakmer.cfg. Below lists and describes the parameters that can be used in the configuration file. Do not keep commented text (i.e., #Required parameters) in the configuration file.

ryanabo commented 8 years ago

I apologize for the confusion. I will update the documentation to indicate that this is now possible.