Skip to content

Commit

Permalink
warning about seq type and suppress warnings for mpl sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
aineniamh committed Apr 12, 2024
1 parent 643b5bf commit b04f51e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snipit/scripts/snp_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from itertools import groupby, count
from collections import OrderedDict
from enum import Enum
import warnings
warnings.filterwarnings('ignore')

# imports from other modules
from Bio import SeqIO
Expand All @@ -20,6 +22,7 @@
import matplotlib.patches as patches
from matplotlib.patches import Polygon


colour_list = ["lightgrey","white"]
colour_cycle = cycle(colour_list)
END_FORMATTING = '\033[0m'
Expand Down Expand Up @@ -64,7 +67,7 @@ def check_ref(recombi_mode):
sys.exit(-1)


def qc_alignment(alignment,reference,sequence_type,cds_mode,cwd):
def qc_alignment(alignment,reference,cds_mode,sequence_type,cwd):
lengths = []
lengths_info = []
num_seqs = 0
Expand Down Expand Up @@ -108,6 +111,8 @@ def qc_alignment(alignment,reference,sequence_type,cds_mode,cwd):
sys.stderr.write(red("Error: CDS mode flag used but alignment length not a multiple of 3.\n"))
sys.exit(-1)

print(green(f"Note:") + f" assuming the alignment provided is of type {sequence_type}. If this is not the case, change input --sequence-type")

return num_seqs,ref_input,record_ids,lengths[0]

def reference_qc(reference, record_ids,cwd):
Expand Down

0 comments on commit b04f51e

Please sign in to comment.