SlideShare a Scribd company logo
1 of 31
Download to read offline
Using	YesWorkflow
hybrid	queries	to	reveal	data	lineage	from	
data	curation	activities
Qian	Zhang,	Paul	J.	Morris,	Timothy	McPhillips,	James	Hanken,	David	B.	Lowery,	
Bertram	Ludäscher,	James	A.	Macklin,	Robert	A.	Morris,	John	Wieczorek
NSF	Kurator Project	
wiki.datakurator.org &			github.com/kurator-org
Provenance	(Lineage)	matters	…	
• One	of	these	sold	for	$180M,	the	other	one	for	
$22K	(but	could	be	worth	more	...	definitely	maybe	...)	
• Which	one	would	you	like	to	own?	
YW	provenance
2
Provenance	is	
everywhere	…	
At	the	airport:	
- “So	where	did	you come	from?”
- Depending	on	where	you	came	
from	determines	where	you	go
YW	provenance
3
Oxford	English	Dictionary:	Provenance =		
- the	place	of	origin	or	earliest	known
history of	something:
- the	beginning of	something’s	
existence;	its	origin:
- a record	of	ownership used	as	a	guide	
to	authenticity or	quality
Provenance	is:	keeping	records	…	
• Can	you	see	the	provenance?	Which	kind	of	provenance?		
• Grand	Canyon’s	rock	layers	are	a	record	of	the	early	geologic	history	of	North	America.	
The	ancestral	puebloan granaries	at	Nankoweap Creek	tell	archaeologists	about	more	
recent	human	history.	(By	Drenaline,	licensed	under	CC	BY-SA	3.0)
YW	provenance
4
...	and	provenance	is:	
Understanding	what	happened!
Zrzavý,	Jan,	David	Storch,	and Stanislav	
Mihulka.	Evolution:	Ein	Lese-Lehrbuch.	
Springer-Verlag,	2009.
Author:	Jkwchui (Based	on	
drawing	by	Truth-seeker2004)
YW	provenance
5
"The government are very keen on
amassing statistics. They collect them,
add them, raise them to the nth power,
take the cube root and prepare
wonderful diagrams.
But you must never forget that every one
of these figures comes in the first
instance from the village watchman,
who just puts down what he damn
pleases.”
YW	provenance
6
Why	we	need	data	lineage	and	
computational	provenance
Computational Provenance …
• Origin,	processing	history	of	artifacts
– data	products,	figures,	...
– also:	workflow/script	evolution	…
è understand	methods,	dataflow,	and	dependencies
YW	provenance
7
Climate Change Impacts
in the United States
U.S. National Climate Assessment
U.S. Global Change Research Program
Rewind: Data Curation Workflows
(Filtered-Push … Kepler … Kurator projects)
YW	provenance
8
Data	Curation	Workflows	&	Provenance
• Data	curation	and	data	cleaning	workflows	
– …	can	be	defined	using	a	workflow	system	
• workflow	=	“prospective”	provenance	(=	general	recipe)
– ...	or	using	good-old scripts (bash,	Python,	R,	...)	
• …	which	is	what	many	“mere	mortals”	use!
• Script-based	workflows	
– …	benefit	from	having	the	workflow	exposed	and	
dataflow	dependencies	revealed
YW	provenance
9
GetModernClimate
PRISM_annual_growing_season_precipitation
SubsetAllData
dendro_series_for_calibration
dendro_series_for_reconstruction CAR_Analysis_unique
cellwise_unique_selected_linear_models
CAR_Analysis_union
cellwise_union_selected_linear_models
CAR_Reconstruction_union
raster_brick_spatial_reconstruction raster_brick_spatial_reconstruction_errors
CAR_Reconstruction_union_output
ZuniCibola_PRISM_grow_prcp_ols_loocv_union_recons.tif ZuniCibola_PRISM_grow_prcp_ols_loocv_union_errors.tif
master_data_directory prism_directory
tree_ring_datacalibration_years retrodiction_years
?
YesWorkflow:	
Yes,	scripts	are	workflows,	too!
• Script vs Workflows	(ASAP):
– Automation: *****
– Scaling: **
– Abstraction: *
– Provenance: ** => *****
YW	provenance
10
YesWorkflow:	Prospective &	Retrospective	
Provenance	…	(almost)	for	free!	
• YW	annotations	in	
the	script	(R,	
Python,	Matlab)	
are	used	to	
recreate	the	
workflow	view	
from	the	script	…	
cassette_id
sample_score_cutoff
sample_spreadsheet
file:cassette_{cassette_id}_spreadsheet.csv
calibration_image
file:calibration.img
initialize_run
run_log
file:run/run_log.txt
load_screening_results
sample_namesample_quality
calculate_strategy
rejected_sample accepted_sample num_images energies
log_rejected_sample
rejection_log
file:/run/rejected_samples.txt
collect_data_set
sample_id energy frame_number
raw_image
file:run/raw/{cassette_id}/{sample_id}/e{energy}/image_{frame_number}.raw
transform_images
corrected_image
file:data/{sample_id}/{sample_id}_{energy}eV_{frame_number}.img
total_intensitypixel_count corrected_image_path
log_average_image_intensity
collection_log
file:run/collected_images.csv
YW!
YW	provenance
11
DwCA Taxon	Lookup	
Workflow
• Declare	inputs,	outputs,	and	
steps of	a	script	or	wf	with	
YesWorkflow	annotations
– communicate	provenance	
graphically	(via	graphviz)
– combine different	forms	of	
provenance
– query provenance	
• Simple	YW	annotations	in	
comments:
– @begin,	@end
– @in,	@out
– @uri,	@log,	..	
YW	provenance
12
�����������������
�����
��������������������������������������������������������������
��������������������������������������������������������������
��������������
����������������������������������
���������
����������������
�������������������������������������������������������������
����������
�����������������
��������������������������������������������������������������������������������������
����������������
�������
��������������
������������������
�������������������������������������
����������������
�����������������
��������������������������������������
�������������������
�����������
�������������������������������
������������������
����������
������������������������������
�����������������
�����������
����������������������������
������������
�������������
������������������������������������������������������
���������������������
�����������������������������������
�����������������
Taxon	Lookup	Workflow:	
Data	View	and	Process	View
YW	provenance
13
YW	provenance
14
�����������������
�����
��������������������������������������������������������������
��������������������������������������������������������������
��������������
����������������������������������
���������
����������������
�������������������������������������������������������������
����������
�����������������
��������������������������������������������������������������������������������������
����������������
�������
��������������
������������������
�������������������������������������
����������������
�����������������
��������������������������������������
�������������������
�����������
�������������������������������
������������������
����������
������������������������������
�����������������
�����������
����������������������������
������������
�������������
������������������������������������������������������
���������������������
�����������������������������������
�����������������
Taxon	Lookup	Workflow:	Combined	view
Data	
curation	
script	/	
workflow
+	
YW	
annotations
Hybrid Provenance:
YW	Model + Runtime	
Observables (file	level)	
YW	provenance
15
�����������������
�����
���������
��������������
����������������
����������
�����������������
����������������
�������
����������
������������������
����������������
�����������������
�������������������
�����������
������������������
����������
�����������������
�����������
������������
�������������
���������������������
�������������������������������������������������������������������
�����������������
�������������������������������������������������������������������������
• The	YW	model	can	be	connected	
with	runtime	observables
• è YW	recon	(for	provenance	
reconstruction)
• Here:	
• What	specific	files	were	read,	
written	and	where	do	they	
occur	in	the	workflow?
The	story	of	
two	individual	
records
YW	provenance
16
�����������������
�����������������
�������������������
�������
����������
����������
�����������������
�����
���������
��������������
����������������
����������
���������������
�����������������
����������������
������
������������������
����������������
�������������������������������
�����������
������������������
����
�����������
������������
�������������
���������������������
�������������������������������������������������������������������
�����������������
�������������������������������������������������������������������������
�����������������
������������������
����������������
�������
����������
�����������
������������������
�����
���������
��������������
����������������
����������
���������������
�����������������
����������������
���������
�����������������
�������������������
���������������������������������
����������
�����������������
��������������������������������������
�����������
������������
�������������
���������������������
�������������������������������������������������������������������
�����������������
������������������������������������������������������������������
• One	took	the	GBIF
route,	while	…
• … the	other	went	
all	WORMS!
The	aggregate story	..
YW	provenance
17
�����������������
�����
���������
��������������
����������������
����������
����������
�����������������
����������������
����������
�������
����������
������������������
����������������
���������
�����������������
�������������������
���������
�����������
������������������
�������������
���������
����������
�����������������
�������������
��������
�����������
������������
�������������
���������������������
�������������������������������������������������������������������
�����������������
�������������������������������������������������������������������������
• How	many	records	were	
observed	as	inputs	or	outputs	
of	workflow	steps?
• Were	there	any	NULL	values?	
How	many?
Summary
• YW	annotations	can	be	added	
easily	to	your	scripts	to	reap	
workflow	benefits
– Documentation of	what’s	
important	
– Visualization of	dependencies
– Querying	provenance	
(prospective,	retrospective,	
and	hybrid)
• New	production	release	
coming	your	way!
=> github.com/yesworkflow-org/yw
=> try.yesworkflow.org
YW	provenance
18
�����������������
�����
��������������������������������������������������������������
��������������������������������������������������������������
��������������
����������������������������������
���������
����������������
�������������������������������������������������������������
����������
�����������������
��������������������������������������������������������������������������������������
����������������
�������
��������������
������������������
�������������������������������������
����������������
�����������������
��������������������������������������
�������������������
�����������
�������������������������������
������������������
����������
������������������������������
�����������������
�����������
����������������������������
������������
�������������
������������������������������������������������������
���������������������
�����������������������������������
�����������������
�����������������
�����
���������
��������������
����������������
����������
����������
�����������������
����������������
����������
�������
����������
������������������
����������������
���������
�����������������
�������������������
���������
�����������
������������������
�������������
���������
����������
�����������������
�������������
��������
�����������
������������
�������������
���������������������
�������������������������������������������������������������������
�����������������
�������������������������������������������������������������������������
Still	here?
We’re	done!!	
YW	provenance
19
Really	- Still	here???	
So	want	to	learn	more	about	and	see	YW	action?
Start	here:
https://github.com/yesworkflow-org/yw-prototypes
But	let’s	see	some	provenance	queries	and	answers	
first!
YW	provenance
20
Demo	Time
YW	Provenance
21
(Disclaimer) https://github.com/idaks/dataone-ahm-2016-poster
https://github.com/idaks/wt-prov-summer-2017
https://github.com/yesworkflow-org/yw-idcc-17
C3-C4	Prospective	Provenance	
YW	Provenance
C3_C4_map_present_NA
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_air_temperature_data
Tair_Matrix
fetch_monthly_mean_precipitation_data
Rain_Matrix
initialize_Grass_Matrix
Grass_variable
examine_pixels_for_grass
C3_Data C4_Data
generate_netcdf_file_for_C3_fraction
C3_fraction_data
file:outputs/SYNMAP_PRESENTVEG_C3Grass_RelaFrac_NA_v2.0.nc
generate_netcdf_file_for_C4_fraction
C4_fraction_data
file:outputs/SYNMAP_PRESENTVEG_C4Grass_RelaFrac_NA_v2.0.nc
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
file:outputs/SYNMAP_PRESENTVEG_Grass_Fraction_NA_v2.0.nc
SYNMAP_land_cover_map_data
inputs/land_cover/SYNMAP_NA_QD.nc
mean_airtemp
file:inputs/narr_air.2m_monthly/air.2m_monthly_{start_year}_{end_year}_mean.{month}.nc
mean_precip
file:inputs/narr_apcp_rescaled_monthly/apcp_monthly_{start_year}_{end_year}_mean.{month}.nc
22
What	does	C4_fraction_data depend	on	?
C3_C4_map_present_NA
examine_pixels_for_grass
C4_Data
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_precipitation_data
Rain_Matrix
fetch_monthly_mean_air_temperature_data
Tair_Matrix
generate_netcdf_file_for_C4_fraction
C4_fraction_data
SYNMAP_land_cover_map_data
mean_airtempmean_precip
C3_C4_map_present_NA
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_air_temperature_data
Tair_Matrix
fetch_monthly_mean_precipitation_data
Rain_Matrix
initialize_Grass_Matrix
Grass_variable
examine_pixels_for_grass
C3_Data C4_Data
generate_netcdf_file_for_C3_fraction
C3_fraction_data
generate_netcdf_file_for_C4_fraction
C4_fraction_data
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
SYNMAP_land_cover_map_data
mean_airtempmean_precip
C4_fraction_data	
lineage very	similar	to	
overall	workflow	graph!
YW	Provenance
23
What	does	Grass_fraction_data depend	on?
C3_C4_map_present_NA
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_air_temperature_data
Tair_Matrix
fetch_monthly_mean_precipitation_data
Rain_Matrix
initialize_Grass_Matrix
Grass_variable
examine_pixels_for_grass
C3_Data C4_Data
generate_netcdf_file_for_C3_fraction
C3_fraction_data
generate_netcdf_file_for_C4_fraction
C4_fraction_data
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
SYNMAP_land_cover_map_data
mean_airtempmean_precip
C4_fraction_data	lineage different	from	overall	workflow	graph!
- Smaller subgraph
- Depends	on	only	1	of	3	inputs!
C3_C4_map_present_NA
initialize_Grass_Matrix
Grass_variable
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
SYNMAP_land_cover_map_data
YW	Provenance
24
What	happens	after	running	the	script?
Hybrid provenance	graph!
• 3	inputs	spread	across	
25 (=2x24	+	1)	files
• Do	all	3	output	files	
depend	on	all	25	
inputs?
C3_C4_map_present_NA
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_air_temperature_data
Tair_Matrix
fetch_monthly_mean_precipitation_data
Rain_Matrix
initialize_Grass_Matrix
Grass_variable
examine_pixels_for_grass
C3_Data C4_Data
generate_netcdf_file_for_C3_fraction
C3_fraction_data
outputs/SYNMAP_PRESENTVEG_C3Grass_RelaFrac_NA_v2.0.nc
generate_netcdf_file_for_C4_fraction
C4_fraction_data
outputs/SYNMAP_PRESENTVEG_C4Grass_RelaFrac_NA_v2.0.nc
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
outputs/SYNMAP_PRESENTVEG_Grass_Fraction_NA_v2.0.nc
SYNMAP_land_cover_map_data
inputs/land_cover/SYNMAP_NA_QD.nc
mean_airtemp
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.9.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.2.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.1.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.6.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.10.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.3.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.7.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.11.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.4.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.8.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.12.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.5.nc
mean_precip
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.4.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.8.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.1.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.12.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.5.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.9.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.2.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.6.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.10.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.3.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.7.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.11.nc
YW	Provenance
25
What	C4_fraction_data	depends	on	(hybrid)	…	
C3_C4_map_present_NA
examine_pixels_for_grass
C4_Data
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_precipitation_data
Rain_Matrix
fetch_monthly_mean_air_temperature_data
Tair_Matrix
generate_netcdf_file_for_C4_fraction
C4_fraction_data
SYNMAP_land_cover_map_data
mean_airtempmean_precip
Earlier	prospective
query	result	
C3_C4_map_present_NA
examine_pixels_for_grass
C4_Data
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_precipitation_data
Rain_Matrix
fetch_monthly_mean_air_temperature_data
Tair_Matrix
generate_netcdf_file_for_C4_fraction
C4_fraction_data
outputs/SYNMAP_PRESENTVEG_C4Grass_RelaFrac_NA_v2.0.nc
SYNMAP_land_cover_map_data
inputs/land_cover/SYNMAP_NA_QD.nc
mean_airtemp
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.4.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.8.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.1.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.12.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.5.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.9.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.2.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.6.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.10.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.3.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.7.nc
inputs/narr_air.2m_monthly/air.2m_monthly_2000_2010_mean.11.nc
mean_precip
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.10.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.3.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.7.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.11.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.4.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.8.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.1.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.12.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.5.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.9.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.2.nc
inputs/narr_apcp_rescaled_monthly/apcp_monthly_2000_2010_mean.6.nc
YW	Provenance
26
What	Grass_fraction_data depends	on	(hybrid)…	
C3_C4_map_present_NA
initialize_Grass_Matrix
Grass_variable
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
SYNMAP_land_cover_map_data
C3_C4_map_present_NA
initialize_Grass_Matrix
Grass_variable
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
outputs/SYNMAP_PRESENTVEG_Grass_Fraction_NA_v2.0.nc
SYNMAP_land_cover_map_data
inputs/land_cover/SYNMAP_NA_QD.nc
C3_C4_map_present_NA
fetch_SYNMAP_land_cover_map_variable
lon_variable lat_variable lon_bnds_variable lat_bnds_variable
fetch_monthly_mean_air_temperature_data
Tair_Matrix
fetch_monthly_mean_precipitation_data
Rain_Matrix
initialize_Grass_Matrix
Grass_variable
examine_pixels_for_grass
C3_Data C4_Data
generate_netcdf_file_for_C3_fraction
C3_fraction_data
generate_netcdf_file_for_C4_fraction
C4_fraction_data
generate_netcdf_file_for_Grass_fraction
Grass_fraction_data
SYNMAP_land_cover_map_data
mean_airtempmean_precip
Overall workflow	
Upstream	of	
Grass_fraction_data
(prospective)	
Upstream	of	Grass_fraction_data
(hybrid)	
# @BEGIN
Gravitational_Wave_Detection
# @IN fn_d @as FN_Detector
# @IN fn_sr @as FN_Sampling_Rate
# @OUT shifted.wav @as
shifted_wave
# @OUT whitenbp.wav @as
whitened_bandpass
import numpy as np
from scipy import signal
…
# @BEGIN
Amplitude_Spectral_Density
# @IN strain_H1
# @IN strain_L1
# @PARAM fs
# @OUT psd_H1
# @OUT psd_L1
# @OUT GW150914_ASDs.png @URI …
…
NFFT = 1*fs
fmin, fmax = 10, 2000
…
YesWorkflow-annotated	
scripts	
Logic	rules	for	r
querying,	and
prospective and
provenance
upstream(strain_LI_whitenbp) [prospective]
WHITENING
strain_H1_whiten strain_L1_whiten
AMPLITUDE_SPECTRAL_DENSITY
PSD_H1 PSD_L1
LOAD_DATA
strain_H1 strain_L1
BANDPASSING
strain_L1_whitenbp
FN_Detector
file:{Detector}_LOSC_4_V1-...
FN_Sampling_rate
file:H-H1_LOSC_{Rate}_V1-...
fs
upstream(strain_L1_whitenbp) [URI-recon]
WHITENING
strain_H1_whiten strain_L1_whiten
AMPLITUDE_SPECTRAL_DENSITY
PSD_H1 PSD_L1
LOAD_DATA
strain_H1 strain_L1
BANDPASSING
strain_L1_whitenbp
FN_Detector
L-L1_LOSC_4_V1-1126259446-32.hdf5
H-H1_LOSC_4_V1-1126259446-32.hdf5
FN_Sampling_rate
H-H1_LOSC_4_V1-1126259446-32.hdf5
H-H1_LOSC_16_V1-1126259446-32.hdf5
fs
YesWorkflow toolkit
Extract annotations	and	
model script	as	a	workflow
YesWorkflow
Reconstruct scrip
retrospective	pro
YesWorkflow toolkit	
Render	workflow	
model	graphically
Prospective	Provenance
user-defined	
workflow	models
Hybrid	Pro
General	purpose	prov
Provenance	q
Query proven
(esp.	graphs
visualize re
Workflow	model	(graph)		
Facts	(Prolog)
Reconstructed	pr
Facts	(Prol
prospective	+	file-
level runtime	
observables	
YW	Provenance
27
LIGO	example:	What	strain_L1_whitenbp depends	on	…	
Overall workflow	
Upstream	of	
strain_L1_whitenbp	
(prospective)	
GRAVITATIONAL_WAVE_DETECTION
LOAD_DATA
Load hdf5 data.
strain_H1strain_L1 strain_16 strain_4
AMPLITUDE_SPECTRAL_DENSITY
Amplitude spectral density.
ASDs
file:GW150914_ASDs.png
PSD_H1PSD_L1
WHITENING
suppress low frequencies noise.
strain_H1_whiten strain_L1_whiten
BANDPASSING
remove high frequency noise.
strain_H1_whitenbp strain_L1_whitenbp
STRAIN_WAVEFORM_FOR_WHITENED_DATA
plot whitened data.
WHITENED_strain_data
file:GW150914_strain_whitened.png
SPECTROGRAMS_FOR_STRAIN_DATA
plot spectrogram for strain data.
spectrogram
file:GW150914_{detector}_spectrogram.png
SPECTROGRAMS_FOR_WHITEND_DATA
plot spectrogram for whitened data.
spectrogram_whitened
file:GW150914_{detector}_spectrogram_whitened.png
FILTER_COEFS
Filter signal in time domain (bandpassing).
COEFFICIENTS
FILTER_DATA
filter data.
filtered_white_noise_data
file:GW150914_filter.png
strain_H1_filtstrain_L1_filt
STRAIN_WAVEFORM_FOR_FILTERED_DATA
plot the filtered data.
H1_strain_filtered
file:GW150914_H1_strain_filtered.png
H1_strain_unfiltered
file:GW150914_H1_strain_unfiltered.png
WAVE_FILE_GENERATOR_FOR_WHITENED_DATA
Make sound files for whitened data.
whitened_bandpass_wavefile
file:GW150914_{detector}_whitenbp.wav
SHIFT_FREQUENCY_BANDPASSED
shift frequency of bandpassed signal.
strain_H1_shifted strain_L1_shifted
WAVE_FILE_GENERATOR_FOR_SHIFTED_DATA
Make sound files for shifted data.
shifted_wavefile
file:GW150914_{detector}_shifted.wav
DOWNSAMPLING
Downsampling from 16384 Hz to 4096 Hz.
H1_ASD_SamplingRate
file:GW150914_H1_ASD_{SamplingRate}.png
FN_Detector
file:{Detector}_LOSC_4_V1-1126259446-32.hdf5
FN_Sampling_rate
file:H-H1_LOSC_{DownSampling}_V1-1126259446-32.hdf5
fs
upstream(strain_LI_whitenbp) [prospective]
WHITENING
strain_H1_whiten strain_L1_whiten
AMPLITUDE_SPECTRAL_DENSITY
PSD_H1 PSD_L1
LOAD_DATA
strain_H1 strain_L1
BANDPASSING
strain_L1_whitenbp
FN_Detector
file:{Detector}_LOSC_4_V1-...
FN_Sampling_rate
file:H-H1_LOSC_{Rate}_V1-...
fs
upstream(strain_L1_whitenbp) [URI-recon]
WHITENING
strain_H1_whiten strain_L1_whiten
AMPLITUDE_SPECTRAL_DENSITY
PSD_H1 PSD_L1
LOAD_DATA
strain_H1 strain_L1
BANDPASSING
strain_L1_whitenbp
FN_Detector
L-L1_LOSC_4_V1-1126259446-32.hdf5
H-H1_LOSC_4_V1-1126259446-32.hdf5
FN_Sampling_rate
H-H1_LOSC_4_V1-1126259446-32.hdf5
H-H1_LOSC_16_V1-1126259446-32.hdf5
fs
upstream(strain_LI_whitenbp) [NW-recon]
WHITENING
strain_L1_whiten
strain_L1_whiten = array([8.494, -1.672, ..., 72.156])
AMPLITUDE_SPECTRAL_DENSITY
PSD_L1
psd_L1 = scipy.interpolate.interpolate.interp1d
object at 0x113969418
LOAD_DATA
strain_L1
strain_L1 = array([-1.779e-18, -1.765e-18, ..., -1.719e-18])
BANDPASSING
strain_L1_whitenbp
strain_L1_whitenbp = array([8.184, 19.935,..., -0.684])
FN_Detector
fn_d = L-L1_LOSC_4_V1-1126259446-32.hdf5
fs
fs = 4096
Upstream	of	strain_L1_whitenbp	
(hybrid	YW-NW	at	the	code-
level)	
Upstream	of	strain_L1_whitenbp	
(hybrid	YW-NW	at	the	file-level)	
3	inputs	spread	across	
5 (=2x2	+	1)	files
Does	intermediate	data	
strain_L1_whitenbp	
depend	on	all	5	inputs?
• Intermediate	data	
strain_L1_whiten
bp	depend	only	
on	2 out	of	5	
inputs!
YW	Provenance
28
YW-IDCC’17	Demo	Use	Cases
Domain Use	case Programming	language Provenance	methods
Climate	science C3C4 MATLAB YW	+	MATLAB
RunManager
Astrophysics LIGO Python YW	+	NW	(code-level)
Protein crystal	samples Simulate	data	
collection
Python	 YW	+	NW	(code-level)
Biodiversity	data	
curation
kurator-SPNHC Python YW-recon	+	YW-logging
Social	network analysis Twitter Python	 YW +	NW	(file-level)
Oceanography	 OHIBC Howe Sound
(multi-run multi-script)
R	 YW +	R	RunManager
YW	provenance
29
Adding YW to DataONE
Yaxing’s script with	
inputs &	output	
products
Christopher’s	
YesWorkflow
model
Christopher	using
Yaxing’s outputs	as	
inputs	for	his	script
Christopher’s	results	
can	be	traced	back	all	
the	way	to	Yaxing’s
input
YW	provenance
30
A	simple	way	to	obtain	finer-grained	
retrospective	provenance:	Log	Files!
YW	provenance
31

More Related Content

More from Bertram Ludäscher

From Research Objects to Reproducible Science Tales
From Research Objects to Reproducible Science TalesFrom Research Objects to Reproducible Science Tales
From Research Objects to Reproducible Science Tales
Bertram Ludäscher
 
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency AnnotationsValidation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
Bertram Ludäscher
 
An ontology-driven framework for data transformation in scientific workflows
An ontology-driven framework for data transformation in scientific workflowsAn ontology-driven framework for data transformation in scientific workflows
An ontology-driven framework for data transformation in scientific workflows
Bertram Ludäscher
 
From Provenance Standards and Tools to Queries and Actionable Provenance
From Provenance Standards and Tools to Queries and Actionable ProvenanceFrom Provenance Standards and Tools to Queries and Actionable Provenance
From Provenance Standards and Tools to Queries and Actionable Provenance
Bertram Ludäscher
 

More from Bertram Ludäscher (20)

From Research Objects to Reproducible Science Tales
From Research Objects to Reproducible Science TalesFrom Research Objects to Reproducible Science Tales
From Research Objects to Reproducible Science Tales
 
Possible Worlds Explorer: Datalog & Answer Set Programming for the Rest of Us
Possible Worlds Explorer: Datalog & Answer Set Programming for the Rest of UsPossible Worlds Explorer: Datalog & Answer Set Programming for the Rest of Us
Possible Worlds Explorer: Datalog & Answer Set Programming for the Rest of Us
 
Deduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
Deduktive Datenbanken & Logische Programme: Eine kleine ZeitreiseDeduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
Deduktive Datenbanken & Logische Programme: Eine kleine Zeitreise
 
[Flashback 2005] Managing Scientific Data: From Data Integration to Scientifi...
[Flashback 2005] Managing Scientific Data: From Data Integration to Scientifi...[Flashback 2005] Managing Scientific Data: From Data Integration to Scientifi...
[Flashback 2005] Managing Scientific Data: From Data Integration to Scientifi...
 
Dissecting Reproducibility: A case study with ecological niche models in th...
Dissecting Reproducibility:  A case study with ecological niche models  in th...Dissecting Reproducibility:  A case study with ecological niche models  in th...
Dissecting Reproducibility: A case study with ecological niche models in th...
 
Incremental Recomputation: Those who cannot remember the past are condemned ...
Incremental Recomputation:  Those who cannot remember the past are condemned ...Incremental Recomputation:  Those who cannot remember the past are condemned ...
Incremental Recomputation: Those who cannot remember the past are condemned ...
 
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency AnnotationsValidation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
 
An ontology-driven framework for data transformation in scientific workflows
An ontology-driven framework for data transformation in scientific workflowsAn ontology-driven framework for data transformation in scientific workflows
An ontology-driven framework for data transformation in scientific workflows
 
Knowledge Representation & Reasoning and the Hierarchy-of-Hypotheses Approach
Knowledge Representation & Reasoning and the Hierarchy-of-Hypotheses ApproachKnowledge Representation & Reasoning and the Hierarchy-of-Hypotheses Approach
Knowledge Representation & Reasoning and the Hierarchy-of-Hypotheses Approach
 
Whole-Tale: The Experience of Research
Whole-Tale: The Experience of ResearchWhole-Tale: The Experience of Research
Whole-Tale: The Experience of Research
 
ETC & Authors in the Driver's Seat
ETC & Authors in the Driver's SeatETC & Authors in the Driver's Seat
ETC & Authors in the Driver's Seat
 
From Provenance Standards and Tools to Queries and Actionable Provenance
From Provenance Standards and Tools to Queries and Actionable ProvenanceFrom Provenance Standards and Tools to Queries and Actionable Provenance
From Provenance Standards and Tools to Queries and Actionable Provenance
 
Wild Ideas at TDWG'17: Embrace multiple possible worlds; abandon techno-ligion
Wild Ideas at TDWG'17: Embrace multiple possible worlds; abandon techno-ligionWild Ideas at TDWG'17: Embrace multiple possible worlds; abandon techno-ligion
Wild Ideas at TDWG'17: Embrace multiple possible worlds; abandon techno-ligion
 
A Brief Provenance Tour … via DataONE
A Brief Provenance Tour  … via DataONEA Brief Provenance Tour  … via DataONE
A Brief Provenance Tour … via DataONE
 
Declarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsDeclarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere Mortals
 
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in Practice
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in PracticeWeek-2: Theory & Practice of Data Cleaning: Regular Expressions in Practice
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in Practice
 
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in Theory
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in TheoryWeek-2: Theory & Practice of Data Cleaning: Regular Expressions in Theory
Week-2: Theory & Practice of Data Cleaning: Regular Expressions in Theory
 
First-order Provenance Games
First-order Provenance GamesFirst-order Provenance Games
First-order Provenance Games
 
Why-Not Provenance through Game Semantics
Why-Not Provenance through Game SemanticsWhy-Not Provenance through Game Semantics
Why-Not Provenance through Game Semantics
 
Provenance Games
Provenance GamesProvenance Games
Provenance Games
 

Using YesWorkflow hybrid queries to reveal data lineage from data curation activities