From 21db7aaee358d78a6df926d2eef93d3bff6e8ee1 Mon Sep 17 00:00:00 2001 From: JJTimmons Date: Wed, 3 Mar 2021 20:09:20 -0500 Subject: [PATCH] Fix README's example - dg -> ddg - don't use typing.List that has to be imported --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ee1cdd2..51937eb 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,19 @@ pip install seqfold ### Python ```python -from seqfold import dg, dg_cache, fold, Struct +from seqfold import dg, dg_cache, fold # just returns minimum free energy dg("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC", temp = 37.0) # -12.94 # `fold` returns a list of `seqfold.Struct` from the minimum free energy structure -structs: List[Struct] = fold("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC") +structs = fold("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC") print(sum(s.e for s in structs)) # -12.94, same as dg() for struct in structs: print(struct) # prints the i, j, ddg, and description of each structure # `dg_cache` returns a 2D array where each (i,j) combination returns the MFE from i to j inclusive -cache: List[List[float]] = dg_cache("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC") +cache = dg_cache("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC") ``` ### CLI @@ -61,7 +61,7 @@ $ seqfold GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC -t 32 $ seqfold GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC -t 32 -v -l GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC ((((((((.((((......))))..((((.......)))).)))))))) - i j dg description + i j ddg description 0 48 -2.2 STACK:GG/CC 1 47 -2.2 STACK:GG/CC 2 46 -1.4 STACK:GA/CT