Skip to content

Commit

Permalink
Correct typos and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandregilardet committed Sep 11, 2020
1 parent 35dab34 commit e5222cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions sqlite_herring_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@


def check_table_exists(tbl):
"""Check wether tbl already exists from creation of database, otherwise it would create
"""Check whether table tbl already exists from creation of database, otherwise it would create
an additional one from the csv indexes"""
c.execute(
"SELECT name FROM sqlite_master WHERE type='table'"
) # print all tables' names
names = c.fetchall()
) # select all tables' names
names = c.fetchall() # put all these tables' names into a variable
print(f"Tables in the database are {names}")
if (tbl,) in names:
pass
Expand Down
14 changes: 7 additions & 7 deletions sqlite_salmon_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
c.executescript(
"""DROP TABLE IF EXISTS Samples;
DROP TABLE IF EXISTS Genotypes;
DROP TABLE IF EXISTS Snp_list;
DROP TABLE IF EXISTS Snp_pos;
DROP TABLE IF EXISTS SNP_annotations;
DROP TABLE IF EXISTS SNP_position;
DROP TABLE IF EXISTS Rivers;
CREATE TABLE Samples(
Expand Down Expand Up @@ -130,13 +130,13 @@ def get_gt_csv(file):
"/mnt/c/Users/alexa/Matis/SQL/data/salmon_sql_data/rivers/rivers_to_import_sql.csv",
"Rivers",
)
load_data(
"/mnt/c/Users/alexa/Matis/SQL/data/salmon_sql_data/snp_list/SsaTrack_Island_1-8_SNPlist_modified_sql_import.csv",
"Snp_list",
)
# load_data(
# "/mnt/c/Users/alexa/Matis/SQL/data/salmon_sql_data/snp_list/SsaTrack_Island_1-8_SNPlist_modified_sql_import.csv",
# "Snp_list",
# )
load_data(
"/mnt/c/Users/alexa/Matis/SQL/data/salmon_sql_data/snp_pos/Track_SNP_Pos.csv",
"Snp_pos",
"SNP_position",
)
load_data(
"/mnt/c/Users/alexa/Matis/SQL/data/salmon_sql_data/calls_mod/SsaTrack_Island_1-8.calls_mod.csv",
Expand Down

0 comments on commit e5222cd

Please sign in to comment.