From a15b96e70b8173c63092efccdcd5227d23dc5800 Mon Sep 17 00:00:00 2001 From: Eric Boittier <ericdavid.boittier@unibas.ch> Date: Mon, 12 Dec 2022 16:09:49 +0100 Subject: [PATCH] testing CI --- .gitlab-ci.yml | 4 ++-- cdna/cdna.py | 4 ++-- cdna/cli.py | 21 ++++++++++++++++----- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09a5677..5adc43e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,5 +6,5 @@ default: my_tests: # Good to put a small description here of what this job does script: - - echo "Command 1" - - echo "Command 2" + - black cdna + - pylint cdna diff --git a/cdna/cdna.py b/cdna/cdna.py index c5f6d31..326d905 100644 --- a/cdna/cdna.py +++ b/cdna/cdna.py @@ -140,7 +140,7 @@ class CDNAGen: self.fasta_dict = {x.name: x for x in records} def read_csv(self) -> None: - """ Reads a given copy number csv file + """Reads a given copy number csv file Wrapper for Pandas read_csv. @@ -185,7 +185,7 @@ class CDNAGen: id_CSV = str(row["seqname"]).split("_")[1] # Calculate Normalized_Binding_Probability and add to GTF dataframe df_input_GTF.loc[index, "Normalized_Binding_Probability"] = ( - row["Binding_Probability"] / df_normalization_bind_probablility[id_GTF] + row["Binding_Probability"] / df_normalization_bind_probablility[id_GTF] ) # Calculate Normalized_Binding_Probability and add to GTF dataframe csv_transcript_copy_number = self.df_input_CSV.loc[ diff --git a/cdna/cli.py b/cdna/cli.py index f3100e0..e8e2cd7 100644 --- a/cdna/cli.py +++ b/cdna/cli.py @@ -9,14 +9,25 @@ def parser(): prog="cDNA generator", description="Generate cDNA sequences based on primer probabilities.", ) - parser.add_argument("-ifa", "--input_fasta", help="genome fasta file", required=True) + parser.add_argument( + "-ifa", "--input_fasta", help="genome fasta file", required=True + ) parser.add_argument("-igtf", "--input_gtf", help="gtf file", required=True) - parser.add_argument("-ofa", "--output_fasta", help="output fasta file", required=True) - parser.add_argument("-icpn", "--input_copy_number", help="input copy number (csv) file", required=True) - parser.add_argument("-ocsv", "--output_csv", help="output fasta file", required=True) + parser.add_argument( + "-ofa", "--output_fasta", help="output fasta file", required=True + ) + parser.add_argument( + "-icpn", + "--input_copy_number", + help="input copy number (csv) file", + required=True, + ) + parser.add_argument( + "-ocsv", "--output_csv", help="output fasta file", required=True + ) args = parser.parse_args() - print(' \n'.join(f'{k}={v}' for k, v in vars(args).items())) + print(" \n".join(f"{k}={v}" for k, v in vars(args).items())) print() CDNA = CDNAGen( ifasta=args.input_fasta, -- GitLab