Skip to content

Instantly share code, notes, and snippets.

View howaboutudance's full-sized avatar

Michael Penhallegon howaboutudance

View GitHub Profile

Keybase proof

I hereby claim:

  • I am howaboutudance on github.
  • I am mpenhall (https://keybase.io/mpenhall) on keybase.
  • I have a public key ASBZRMcyFONJlF29xGXsRTx-hUAB7KyWwCNPT4kt2vPHPgo

To claim this, I am signing this object:

@howaboutudance
howaboutudance / update_query_example.R
Last active June 13, 2019 21:11
An example of R code to generate a update query string
library(dplyr)
library(purrr)
#' generate a string for updating qc status table
#'
#' a qc status table is expect (at minimum) to have fields:
#' - sample -- the accession number (unique identitfier of sample by vendor)
#' - panel -- the test panel run on the sample
#' - qc_failed -- a qc status integer corresponding to 0-5 statuses (found on a lookup table)
#'
### Keybase proof
I hereby claim:
* I am howaboutudance on github.
* I am mpenhall (https://keybase.io/mpenhall) on keybase.
* I have a public key ASAcJqLxvBhkij5eTnkzFrYG-Uua56lcQWErBIDXNdk2Two
To claim this, I am signing this object:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Mailvelope v4.4.0
Comment: https://www.mailvelope.com
xsFNBF/79GEBEACXfbGAc61096ZbUBmuTxLlPTVqeOyhh1qLT+9HHchJB0z/
r0z0hpkpnvnwv0b3fHc0HhXfvu6J3WFZ81h2JceAqAr3L0CN7UU3JCbc9c/K
XLll1X1HIBuAbccImfKt3jYnGJBC7dslHgoQnZolV1gwRyTr6yktzLG8EUEn
fqqCUQeIFF4THn4KOGW0A6wqPCDTGzkqUZt8t/JtxbnQEq3kmWT7EDuykwPx
P9KsFERk8Vqcia/PTMLudzyaNNhxtaDJ64VLu0JMW7O3xnFN8I0ZVJqR3wzo
w2cmRFDN0nel5pTbdM60LRMr56nGpTyvdBA7anwod6zxTVDWtkyxXnAQgRGL
import json
json_file = json.load(open("temp.json"))
result = "" # resulting string
for x in json_file["files"]:# "files" for key value that is assigned to
# the file array
chapter_file = open(x)
result += chapter_file.read()