Skip to content

Commit

Permalink
Update black to later version for both pre-commit and github action (…
Browse files Browse the repository at this point in the history
…fixed to 23.10.1)
  • Loading branch information
matthuska committed Oct 24, 2023
1 parent e0ad5e7 commit b2951c1
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
- uses: psf/black@23.10.1
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- --keep-unused-type-checking
- --black-line-length=79

- repo: https://github.com/python/black
rev: 22.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black
1 change: 1 addition & 0 deletions lib/Lineages_UPDATER.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# print("Dependency `pango_aliasor` missing, please install using `pip install pango_aliasor`")
# raise e


# In covSonar 1 we will copy the class from https://github.com/corneliusroemer/pango_aliasor/blob/main/src/pango_aliasor/aliasor.py
# but for V.2 we will switch using the package to "pip install pango_aliasor"
class Aliasor:
Expand Down
2 changes: 0 additions & 2 deletions lib/sonardb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,6 @@ def iter_table(self, table, batch_size=1000):

## extra features
def get_list_of_lineages(self, lineage):

sql = (
"SELECT DISTINCT lineage FROM genome WHERE lineage LIKE '" + lineage + "';"
)
Expand Down Expand Up @@ -1719,7 +1718,6 @@ def match(
count=False,
frameshifts=0,
):

# creating where condition
where_clause = []
where_vals = []
Expand Down
1 change: 0 additions & 1 deletion lib/sonartoVCF_v2.bak.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def calculate_AC_AN(final_df):


def create_vcf(rows_grouped, tmp_dirname, refdescr):

process_id = str(getpid())
# print(process_id+" Start")
# iterate over each group
Expand Down
5 changes: 0 additions & 5 deletions lib/sonartoVCF_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def calculate_AC_AN(final_df):


def _check_variant_type(ref, alt):

if len(ref) == len(alt) and len(alt) == 1: # SNP
return "SNP"
elif len(ref) < len(alt) and len(alt) > 0: # INS
Expand Down Expand Up @@ -191,7 +190,6 @@ def create_vcf(rows_grouped, tmp_dirname, refdescr):
# final_snp_df[group_name] = "." # init value
# final_indel_df[group_name] = "." # init value
for row in df_.itertuples():

_id = (
getattr(row, "ref")
+ str(getattr(row, "start"))
Expand All @@ -208,7 +206,6 @@ def create_vcf(rows_grouped, tmp_dirname, refdescr):
index_start_postion
] # return scalar instead DF
if selected_row.ID == ".": # A

final_snp_df.at[index_start_postion, "ID"] = _id
final_snp_df.at[index_start_postion, group_name] = "1"
final_snp_df.at[index_start_postion, "REF"] = getattr(
Expand All @@ -225,7 +222,6 @@ def create_vcf(rows_grouped, tmp_dirname, refdescr):
): # only one ID exists and just update GT of a sample
final_snp_df.at[index_start_postion, group_name] = "1"
else:

splited_final_id_list = selected_row.ID.split(";")
totel_len = len(splited_final_id_list)
for new_GT, splited_final_id in enumerate(
Expand Down Expand Up @@ -264,7 +260,6 @@ def create_vcf(rows_grouped, tmp_dirname, refdescr):
elif (
_type == "INS" or _type == "INDEL" or _type == "DEL"
): # C or _type == 'DEL'

selected_row = final_indel_df[
(final_indel_df["POS"] == getattr(row, "start"))
& (final_indel_df["TYPE"] == _type)
Expand Down
1 change: 0 additions & 1 deletion sonar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ def process_update_expressions(expr):

# add
if args.tool == "add":

# sanity check
if not args.file and not args.cache:
sys.exit("nothing to add.")
Expand Down

0 comments on commit b2951c1

Please sign in to comment.