Commit f3ab86f8 authored by Pauline Pommeret's avatar Pauline Pommeret
Browse files

Fixing some pylint comments

parent 50d8f82a
......@@ -5,7 +5,6 @@ Un fichier pour faire des tests
"""
import os
import sys
import argparse
import sequence
......@@ -14,27 +13,27 @@ import lib.trx as trx_lib
import lib.database as database
if __name__ == "__main__":
dbcursor = database.PGCursor()
DBCURSOR = database.PGCursor()
# Use argparse to parse arguments. We first create a parser.
parser = argparse.ArgumentParser(description="ToDo")
PARSER = argparse.ArgumentParser(description="ToDo")
# Adding arguments to the parser
parser.add_argument("-a", "--alphabet", type=str, default="dna", help="Alphabet (DNA, RNA, prot): Unambiguous IUPAC alphabet that will be used.", action="store")
parser.add_argument("-A", "--alpha", type=float, default=0.05, help="Alpha parameter for statistic analysis", action="store")
parser.add_argument("-c", "--centering", type=int, default=72, help="Centering parameter", action="store")
parser.add_argument("-g", "--graph", type=int, default=None, help="Plot graphs................. There, it's done.", action="store")
parser.add_argument("-s", "--sliding", type=int, default=72, help="Sl______iding parameter", action="store")
parser.add_argument("-t", "--trx-scale-file", type=str, default=trx_lib.scale_file, help="Path to trx scale file", action="store")
parser.add_argument("datadir", type=str, help="Path to the data directory.", action="store")
PARSER.add_argument("-a", "--alphabet", type=str, default="dna", help="Alphabet (DNA, RNA, prot): Unambiguous IUPAC alphabet that will be used.", action="store")
PARSER.add_argument("-A", "--alpha", type=float, default=0.05, help="Alpha parameter for statistic analysis", action="store")
PARSER.add_argument("-c", "--centering", type=int, default=72, help="Centering parameter", action="store")
PARSER.add_argument("-g", "--graph", type=int, default=None, help="Plot graphs................. There, it's done.", action="store")
PARSER.add_argument("-s", "--sliding", type=int, default=72, help="Sl______iding parameter", action="store")
PARSER.add_argument("-t", "--trx-scale-file", type=str, default=trx_lib.scale_file, help="Path to trx scale file", action="store")
PARSER.add_argument("datadir", type=str, help="Path to the data directory.", action="store")
# Then, parse it
args = parser.parse_args()
if not args.datadir:
ARGS = PARSER.parse_args()
if not ARGS.datadir:
raise EnvironmentError("You have to give a data directory.")
for directory in os.listdir(args.datadir):
cur_dir = os.path.join(args.datadir, directory)
for directory in os.listdir(ARGS.datadir):
cur_dir = os.path.join(ARGS.datadir, directory)
md_parameters = {}
label = ""
fasta_file = None
......@@ -51,5 +50,5 @@ if __name__ == "__main__":
print label
print fasta_file
print md_parameters
seq = sequence.Sequence(fasta_file, md_parameters, label, alphabet=args.alphabet, trx_scale_path=args.trx_scale_file, sliding=args.sliding, centering=args.centering, alpha=args.alpha, graph=args.graph)
dbcursor.store_sequence(seq)
seq = sequence.Sequence(fasta_file, md_parameters, label, alphabet=ARGS.alphabet, trx_scale_path=ARGS.trx_scale_file, sliding=ARGS.sliding, centering=ARGS.centering, alpha=ARGS.alpha, graph=ARGS.graph)
DBCURSOR.store_sequence(seq)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment