Skip to content

Commit

Permalink
wip: fixing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyama341 committed Sep 26, 2024
1 parent 09058fa commit c0750bc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
5 changes: 3 additions & 2 deletions web_app/callbacks/workflow_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,11 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
logger.info("Golden Gate Cloning setup completed.")


# Primer generation, analysis, and gel electrophoresis simulation
# Primer generation, analysis
primer_df = golden_gate.generate_primer_dataframe()
logger.info(f"Primer dataframe generated: {primer_df.shape[0]} rows")


# TODO maybe remove this redundancy.
analyze_primers_and_hairpins(primer_df)
logger.info("Primers analyzed for hairpins.")

Expand Down
2 changes: 1 addition & 1 deletion web_app/callbacks/workflow_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
]

output_files = [
{"name": "cBEST_w_sgRNAs.gb", "content": sgRNA_vectors},
{"name": "CRISPRi_w_sgRNAs.gb", "content": sgRNA_vectors},
{"name": "full_idt.csv", "content": idt_primers},
{"name": "sgrna_df.csv", "content": sgrna_df},
{"name": "filtered_df.csv", "content": filtered_df}
Expand Down
9 changes: 2 additions & 7 deletions web_app/callbacks/workflow_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
logging.info("Filtering sgRNAs ")
filtered_df = sgrna_df.groupby('locus_tag').head(number_of_sgRNAs_per_group)

# Filter the DataFrame to retain only up to 5 sgRNA sequences per locus_tag
filtered_df = sgrna_df.groupby('locus_tag').head(number_of_sgRNAs_per_group)

# MAke oligoes
list_of_ssDNAs = make_ssDNA_oligos(filtered_df, upstream_ovh = up_homology,
downstream_ovh=dw_homology)
Expand Down Expand Up @@ -216,8 +213,6 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
logging.info(f"repair_templates_data: {repair_templates_data}")
logging.info(f"overlap_for_gibson_length: {overlap_for_gibson_length}")


# TODO ASSEMBLY DATA DOES NOT YIELD ANY DATA - IT OUTPUTS AND EMPTY list - fix soon
# Assembly
assembly_data = assemble_multiple_plasmids_with_repair_templates_for_deletion(genes_to_KO_list,
processed_records,
Expand Down Expand Up @@ -302,7 +297,7 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect

if in_frame_deletion:
output_files = [
{"name": "cBEST_w_sgRNAs.gb", "content": assembled_contigs}, # LIST OF Dseqrecords
{"name": "Cas9_w_sgRNAs.gb", "content": assembled_contigs}, # LIST OF Dseqrecords
{"name": "primer_df.csv", "content": unique_df},
{"name": "full_idt.csv", "content": full_idt},
{"name": "sgrna_df.csv", "content": sgrna_df},
Expand All @@ -314,7 +309,7 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
]
else:
output_files = [
{"name": "cBEST_w_sgRNAs.gb", "content": sgRNA_vectors}, # LIST OF Dseqrecords
{"name": "Cas9_sgRNAs.gb", "content": sgRNA_vectors}, # LIST OF Dseqrecords
{"name": "full_idt.csv", "content": full_idt},
{"name": "sgrna_df.csv", "content": sgrna_df},
{"name": "filtered_df.csv", "content": filtered_df},
Expand Down
6 changes: 2 additions & 4 deletions web_app/callbacks/workflow_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
# Initialize variables to avoid UnboundLocalError
logging.info("Initializing variables.")
primer_df = pd.DataFrame()
idt_df_with_repair = pd.DataFrame()
unique_df = pd.DataFrame()

# Create a temporary directory
Expand Down Expand Up @@ -211,7 +210,6 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
primer_tm_kwargs={'conc':primer_concentration, 'prodcode':chosen_polymerase} ,
repair_length=repair_templates_length)
# Convert the string to an enzyme object
#enzyme_for_repair_template_integration = getattr(__import__('Bio.Restriction'), enzyme_for_repair_template_integration)
enzyme = getattr(Restriction, str(enzyme_for_repair_template_integration))

logging.info("Digesting plasmids with enzyme_for_repair_template_integration.")
Expand Down Expand Up @@ -307,7 +305,7 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
if in_frame_deletion:
logging.info("Preparing output files for project directory with in-frame deletion.")
output_files = [
{"name": "BEST_w_sgRNAs.gb", "content": assembled_contigs}, # LIST OF Dseqrecords
{"name": "Cas3_w_sgRNAs.gb", "content": assembled_contigs}, # LIST OF Dseqrecords
{"name": "primer_df.csv", "content": primer_df},
{"name": "full_idt.csv", "content": full_idt},
{"name": "sgrna_df.csv", "content": sgrna_df},
Expand All @@ -319,7 +317,7 @@ def run_workflow(n_clicks, genome_content, vector_content, genome_filename, vect
else:
logging.info("Preparing output files for project directory without in-frame deletion.")
output_files = [
{"name": "cBEST_w_sgRNAs.gb", "content": assembled_cas3_plasmids}, # LIST OF Dseqrecords
{"name": "Cas3_sgRNAs.gb", "content": assembled_cas3_plasmids}, # LIST OF Dseqrecords
{"name": "full_idt.csv", "content": full_idt},
{"name": "sgrna_df.csv", "content": sgrna_df},
{"name": "filtered_df.csv", "content": filtered_df},
Expand Down

0 comments on commit c0750bc

Please sign in to comment.