pvhelden / optimize-matrix-GA

Optimise one or several position-specific scoring matrices based on their capability to discriminate positive from negative sequence sets.
GNU Affero General Public License v3.0
0 stars 0 forks source link

check the existence and conformity of input files (matrices and sequences) #33

Closed jvanheld closed 2 months ago

jvanheld commented 2 months ago

Currently, if a file is missing (matrix or sequence file), the program crashes with a python traceback. We should adda control to check that the file

jvanheld commented 2 months ago

ChatGPT prompts;

  1. I have two python programs with parameters parsed by argparse. Currently, if a file is missing (matrix or sequence file), the program crashes with a python traceback. We should adda control to check that the file

    • exists
    • is not empty
    • is a text file (not binary)
    • matches the expected format: transfac for matrices, fasta for sequences Can you propose a python code for this ?
  2. Could you add a proper docstring for each fnuction with the description, input parameters and return type, and indicate in each of them "ChatGPT-generated code" ?