REPRODUCIBILITY: Scrapbook 2020 05 25 - UCSF-Costello-Lab/LG3_Pipeline GitHub Wiki
Define shell function:
prune_timestamps() { sed -E 's/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/YYYY-MM-DD hh:mm:ss/g' | sed -E 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]/hh:mm:ss,uuu/g' | sed -E 's/[A-Z][a-z]+ [A-Z][a-z]+ [0-9]+ [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [A-Z][A-Z][A-Z] [0-9][0-9][0-9][0-9]/DDD MMMM DD hh:mm:ss TZ YYYY/g'; }
prune_folders() { sed -E 's/LG3_Pipeline-[0-9-]+/LG3_Pipeline/g' | sed -E 's/[0-9]+.cclc01.som.ucsf.edu/NNN.cclc01.som.ucsf.edu/g'; }
prune_gatk() { sed -E '/^(real|user|sys)/d' | sed -E '/^WARN ..:..:..,... RestStorageService - Error Response/d'; }
prune_lg3() { sed -E 's/lg3-demo-[^/]+/lg3-demo/g'; }
prune() { prune_timestamps | prune_folders | prune_gatk | prune_lg3; }
Compare:
[cbctest2@n17 lg3-demo-2019-03-23]$ s=../lg3-demo-2018-12-27
[cbctest2@n17 lg3-demo-2019-03-23]$ f=_Recal_Patient157t10.out
[cbctest2@n17 lg3-demo-2019-03-23]$ cat "$s/$f" | prune > a; cat "$f" | prune > b; git diff -U0 --word-diff --no-index a b
diff --git a/a b/b
index 9986d34..6897b5f 100644
--- a/a
+++ b/b
@@ -51 +51 @@ Input:
[-Mon-]{+Sun+} May [-18 11:09:21-]{+17 09:36:03+} PDT 2020
@@ -110 +110 @@ Mon May 18 11:09:21 PDT 2020
[Recal] Finished! [-Mon-]{+Sun+} May [-18 15:38:56-]{+17 12:57:51+} PDT 2020
[cbctest2@n17 lg3-demo-2019-03-23]$