Skip to content

Commit

Permalink
cleaned up user outputs, cleaned up barcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuailevy committed Nov 8, 2021
1 parent f009ce4 commit 9b2ad25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
4 changes: 3 additions & 1 deletion freyja/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def update():
df_barcodes = convert_to_barcodes(df)
df_barcodes = reversion_checking(df_barcodes)
df_barcodes.to_csv(os.path.join(locDir, 'data/usher_barcodes.csv'))
# TODO: delete files generated along the way
# delete files generated along the way that aren't needed anymore
os.remove(lineagePath)
os.remove(os.path.join(locDir, "data/public-latest.all.masked.pb.gz"))


@cli.command()
Expand Down
2 changes: 1 addition & 1 deletion freyja/sample_deconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def build_mix_and_depth_arrays(fn, depthFn, muts):

def reindex_dfs(df_barcodes, mix, depths):
# first, drop Nextstrain clade names.
nxNames = ['20A', '20C', '20D', '20H(Beta,V2)', '21C(Epsilon)']
nxNames = df_barcodes.index[df_barcodes.index.str[0].str.isdigit()]
dropList = set(nxNames) & set(df_barcodes.index)
df_barcodes = df_barcodes.drop(index=dropList)
# reindex everything to match across the dfs
Expand Down
2 changes: 0 additions & 2 deletions freyja/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def download_tree():


def convert_tree():
print('Converting tree into barcodes',)
locDir = os.path.abspath(os.path.join(os.path.realpath(__file__),
os.pardir))
treePath = os.path.join(locDir, "data/public-latest.all.masked.pb.gz")
Expand All @@ -25,7 +24,6 @@ def convert_tree():
def get_curated_lineage_data():
locDir = os.path.abspath(os.path.join(os.path.realpath(__file__),
os.pardir))
print('Downloading an updated curated lineage set from outbreak.info')
url2 = "https://raw.githubusercontent.com/outbreak-info/outbreak.info/"\
"master/web/src/assets/genomics/curated_lineages.json"
urllib.request.urlretrieve(url2,
Expand Down
23 changes: 0 additions & 23 deletions preprocess.sh

This file was deleted.

0 comments on commit 9b2ad25

Please sign in to comment.