changeset 0:80d672b3e6dd draft

Uploaded
author greg
date Thu, 15 Aug 2019 13:17:41 -0400
parents
children b5f5c3d0f349
files .shed.yml test-data/affy_metadata.tabular validate_affy_metadata.py validate_affy_metadata.xml
diffstat 4 files changed, 361 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.shed.yml	Thu Aug 15 13:17:41 2019 -0400
@@ -0,0 +1,11 @@
+name: validate_affy_metadata
+owner: greg
+description: |
+  Contains a tool that validates an Affymetrix metadata file for 96 well plate data.
+homepage_url: http://baumslab.org
+long_description: |
+  Contains a tool that validates an Affymetrix metadata file for 96 well plate data.
+remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/corals/validate_affy_metadata
+type: unrestricted
+categories:
+  - Micro-array Analysis
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/affy_metadata.tabular	Thu Aug 15 13:17:41 2019 -0400
@@ -0,0 +1,97 @@
+#user_specimen_id	field_call	bcoral_genet_id	bsym_genet_id	reef	region	latitude	longitude	geographic_origin	colony_location	depth	disease_resist	bleach_resist	mortality	tle	spawning	collector_last_name	collector_first_name	organization	collection_date	email	seq_facility	array_version	public	public_after_date	sperm_motility	healing_time	dna_extraction_method	dna_concentration	registry_id	result_folder_name	plate_barcode
+1090	palmata			Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-04-05	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	7.636	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1091	palmata			Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-04-05	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	24.082	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1092	palmata			Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-04-05	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	43.933	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1096	palmata			Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-07-02	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	10.16	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1099	palmata			Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State		ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	32.792	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1112	palmata	P1012		Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-04-05	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	10.827	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1113	palmata	P1013		Western Sambo	Florida	24.479867	-81.718667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-04-05	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	8.922	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1146	palmata	P1019		RockKey	Florida	24.456017	-81.859633	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-07-16	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	30.495	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1151	palmata	P1020		RockKey	Florida	24.456017	-81.859633	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2002-07-16	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	22.163	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+1446	cervicornis	C1015		CRF	Florida	25.022308	-80.402375	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2005-05-07	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	6.277	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+2869	palmata	P2582		GR1	Florida	25.091146	-80.40632	Reef	unknown	-9	-9	-9	-9	-9	No	Williams	Dana	University of Miami	2010-08-17	d.williams5@miami.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	16.959	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+2905	palmata	P2598		KL4NOAA	Florida	25.022308	-80.402375	Reef	unknown	-9	-9	-9	-9	-9	No	Williams	Dana	University of Miami	2010-08-20	d.williams5@miami.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	9.667	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15624	prolifera			Sandbores	Belize	16.7791333	-88.11755	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.473	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+3846	cervicornis	C1548		Flat Cay	USVI	18.31822	-64.99104	Reef	unknown	-9	-9	-9	-9	-9	No	TNC	TNC	The Nature Conservancy	2011-11-11	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.008	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+3847	cervicornis	C1548		Flat Cay	USVI	18.31822	-64.99104	Reef	unknown	-9	-9	-9	-9	-9	No	TNC	TNC	The Nature Conservancy	2011-11-11	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	3.641	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+4917	cervicornis	C1492		Little Conch	Florida	24.946333	-80.470166	Colony	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2011-11-22	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	5.574	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+4918	cervicornis	C1494		Plantation Key	Florida	24.9509	-80.4936166	Colony	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2011-11-22	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.433	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+5130	prolifera	P1872		San Cristobal	PuertoRico	17.56493	-67.04515	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2004-06-18	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	54.198	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+6898	palmata	P2427		Looe Key	Florida	24.54585	-81.4050667	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2009-07-14	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	20.179	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15625	prolifera			Sandbores	Belize	16.7791333	-88.11755	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	40.298	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+8952	prolifera	H59		Glovers	Belize	16.908817	-87.773467	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2012-09-13	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	33.666	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9003	prolifera	H8		JudyLang	Cuba	23.220565	-82.346683	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2005-05-19	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	6.834	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9005	prolifera	H9		JudyLang	Cuba	23.220565	-82.346683	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2005-05-19	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	1.612	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9372	prolifera	H10		Nain Cay	Bahamas	22.35199	-75.79612	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	SECORE	2008-01-16	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.015	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9395	cervicornis	C1170		LowerKeys	Florida	24.517654	-81.62134	Reef	unknown	-9	-9	-9	-9	-9	No	TNC	TNC	The Nature Conservancy	2008-02-26	unknown@unknown.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.197	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9585	cervicornis	C1213		Biscayne National Park	Florida	25.39894	-80.16032	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	ACRRE	2008-06-12	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	0.231	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9592	cervicornis	C1215		Biscayne National Park	Florida	25.37236	-80.17155	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	ACRRE	2008-06-12	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	25.613	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9609	cervicornis	C1218		Biscayne National Park	Florida	25.42616	-80.14175	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	ACRRE	2008-06-12	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	5.716	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9749	cervicornis	C1224		Margara	PuertoRico	17.949552	-66.727433	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	SECORE	2008-08-25	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	0.747	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+9759	cervicornis	C1142		Margara	PuertoRico	17.949552	-66.727433	Reef	unknown	-9	-9	-9	-9	-9	No	Miller 	Margaret	SECORE	2008-08-25	m.miller@secore.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.315	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11954	palmata	P1007		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	18.468	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11956	palmata	P1002		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	5.338	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11955	palmata	P2819		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	41.167	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11957	palmata	P2817		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	22.121	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11958	palmata	P2816		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	12.93	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11962	palmata	P2818		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	17.122	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+11963	palmata	P2815		CRF	Florida	24.710868	-80.947981	Reef	unknown	-9	-9	-9	-9	-9	No	Nedimyer	Ken	CRF	2014-04-21	info@coralrestoration.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	20.695	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13692	prolifera	H110		Botany2	USVI	18.357883	-65.032967	Colony	unknown	8	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-10-27	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	5.582	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13694	palmata	P2963		Botany2	USVI	18.357883	-65.032967	Colony	unknown	8	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-10-27	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	24.272	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13710	palmata	P2966		Botany2	USVI	18.359033	-65.032833	Colony	unknown	2	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-10-28	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	12.101	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13734	prolifera	H107		Sapphire	USVI	18.3349	-64.848	Colony	unknown	5	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-10-30	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	9.935	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13756	cervicornis	C1343		FlatKey	USVI	18.316367	-64.98855	Colony	unknown	17	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-10-31	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.504	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13786	cervicornis	C1569		SouthCarrieBowCay	Belize	16.801383	-88.082783	Colony	unknown	4	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-06	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	11.766	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13805	palmata	P2956		Sandbores2	Belize	16.772567	-88.1111	Colony	unknown	3	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-07	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	16.571	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13809	palmata	P2958		SouthCarrieBowCay	Belize	16.8013222	-88.0825	Reef	unknown	2	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-06	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	47.491	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13811	palmata	P2948		GloversAtoll	Belize	16.92005	-87.767217	Colony	unknown	1	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-08	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	18.526	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13835	palmata	P2950		GloversAtoll	Belize	16.9084	-87.767217	Colony	unknown	1	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-08	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	32.604	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13841	palmata	P2965		Sandbores2	Belize	16.763667	-88.113967	Colony	unknown	4	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2015-11-07	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	23.21	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13909	palmata	P2982		SeaAquarium2	Curacao	12.083133	-68.895567	Colony	unknown	8	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-03	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	17.442	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13921	palmata	P2973		DirectorsBay	Curacao	12.0633	-68.859033	Colony	unknown	6	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-04	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	23.66	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13923	cervicornis	C1652		East Point	Curacao	12.043117	-68.762433	Colony	unknown	18	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-05	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	3.405	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13927	palmata	P2696		EastPoint2	Curacao	12.043367	-68.762517	Colony	unknown	7	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-05	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	62.191	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13929	palmata	P2971		EastPoint2	Curacao	12.043467	-68.76315	Colony	unknown	5	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-05	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	37.543	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13931	palmata	P2980		EastPoint2	Curacao	12.043317	-68.763533	Colony	unknown	17	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-05	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	29.898	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13935	cervicornis	C1522		WaterFactory	Curacao	12.109283	-68.954933	Colony	unknown	16	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-06	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	34.711	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13937	palmata	P2975		WaterFactory2	Curacao	12.109517	-68.955367	Colony	unknown	16	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2016-02-06	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	32.487	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+13972	palmata	P2985		WaterFactory2	Curacao	12.109617	-68.954517	Colony	unknown	6	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2016-02-06	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	42.685	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15364	cervicornis	C1333		site 12	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	1.784	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15371	cervicornis	C1671		Carne Nursery	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.363	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15372	cervicornis	C1674		dory channel	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.979	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15373	cervicornis	C1675		wypt 112	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	0.687	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15375	cervicornis	C1677		False Caye	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	8.068	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15377	cervicornis	C1679		by_RHT1	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	14.315	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15378	cervicornis	C1680		BBC_patch	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	38.132	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15391	palmata	P2267		1D	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	18.102	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15395	palmata	P3053		CBC wypt 51	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	37.925	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15626	prolifera			Curlew	Belize	16.7909389	-88.0830056	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	7.46	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15397	palmata	P3055		SWCB2	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	8.958	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15398	palmata	P3056		N of bath room	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	18.42	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15400	prolifera	H124		south dory	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Carne	Lisa	Fragments of Hope	2018-04-20	info@fragmentsofhope.org	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.535	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15610	palmata			SouthCarrieBow	Belize	16.80132222	-88.0825	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	4.45	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15611	palmata			SouthCarrieBow	Belize	16.80132222	-88.0825	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	3.718	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15612	palmata			SouthCarrieBow	Belize	16.80132222	-88.0825	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	23.437	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15613	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	32.171	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15614	palmata			Sandbores	Belize	16.7791333	-88.11755	Reef	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	11.302	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15615	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	14.209	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15616	palmata			Glovers-118	Belize	16.182848	-88.65966	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	5.777	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15617	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.692	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15618	palmata			Glovers-118	Belize	16.182848	-88.65966	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	3.014	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15619	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	17.031	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15620	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	29.548	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15621	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Reef	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	28.366	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15622	palmata			SouthCarrieBowCaye	Belize	16.80145	-88.0827	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	13.49	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15623	palmata			BigAcervPatch	Belize	16.731183	-88.07823	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	2.964	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15719	palmata			Belize	Belize	16.182848	-88.65966	Reef	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2017-08-01	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	21.066	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15721	prolifera			E rocks	Antigua	17.09476	-61.43875	Reef	unknown	2	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	24.012	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15722	prolifera			E rocks	Antigua	17.09476	-61.43875	Reef	unknown	2	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	62.918	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15723	prolifera			E rocks	Antigua	17.09476	-61.43875	Reef	unknown	12	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	53.169	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15724	prolifera			E rocks	Antigua	17.09476	-61.43875	Reef	unknown	10	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	43.791	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15725	prolifera			E rocks	Antigua	17.09476	-61.43875	Reef	unknown	9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	48.219	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15726	prolifera			N rocks	Antigua	17.09476	-61.43875	Reef	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	34.925	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15727	prolifera			N rocks	Antigua	17.09476	-61.43875	Reef	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	107.991	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15728	prolifera			N rocks	Antigua	17.09476	-61.43875	Reef	unknown	2	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2018-05-31	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	31.269	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15720	cervicornis			Belize	Belize	16.182848	-88.65966	Colony	unknown	-9	-9	-9	-9	-9	No	Fogarty	Nicole	NOVA Southeastern	2017-08-01	nf121@nova.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	17.184	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+15729	prolifera			JudyLang	Cuba	23.220565	-82.346683	Reef	unknown	-9	-9	-9	-9	-9	No	Baums	Iliana	Penn State	2005-05-19	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Qiagen DNeasy	7.878	-9	PRO100175_PSU175_SAX_b02	P9SR10074
+14225	palmata	P1000	F100	Horseshoe	Florida	25.139467	-80.29435	Reef	sperm	-9	-9	-9	-9	-9	Yes	Kitchen	Sheila	Penn State	2016-08-20	ibb3@psu.edu	Affymetrix	1	Yes	No	-9	-9	Nucleon Phytopure	11.469	-9	PRO100175_PSU175_SAX_b02	P9SR10074
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/validate_affy_metadata.py	Thu Aug 15 13:17:41 2019 -0400
@@ -0,0 +1,178 @@
+#!/usr/bin/env python
+"""
+Validate the metadata file associated with Affymetrix 96 well plate data.
+"""
+import argparse
+import datetime
+import decimal
+import re
+import shutil
+import sys
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--input', dest='input', help='Metadata file for Affymetrix 96 well plate data')
+parser.add_argument('--output', dest='output', help='Output dataset'),
+args = parser.parse_args()
+
+EMAIL_MAX_LEN = 255
+VALID_EMAIL_RE = re.compile("[^@]+@[^@]+\.[^@]+")
+
+
+def add_error_msg(accumulated_msgs, msg):
+    return "%s\n%s" % (accumulated_msgs, msg)
+
+
+def empty_value(line_no, label, accumulated_msgs):
+    return add_error_msg(accumulated_msgs, "The required %s value is missing on line %d." % (label, line_no))
+
+
+def stop_error(msg):
+    sys.exit(msg)
+
+
+def string_as_boolean_string(string):
+    if str(string).lower() in ['true', 'yes', 'on', '1']:
+        return 'True'
+    else:
+        return 'False'
+
+
+def validate_date_string(line_no, date_string, column, accumulated_msgs):
+    if len(date_string) == 0:
+        return accumulated_msgs
+    try:
+        datetime.datetime.strptime(date_string, '%Y-%m-%d')
+        return accumulated_msgs
+    except ValueError:
+        return add_error_msg(accumulated_msgs, "Line %d contains an incorrect date format (%s must be YYYY-MM-DD) for column %s." % (line_no, date_string, column))
+
+
+def validate_decimal(line_no, decimal_string, column, accumulated_msgs):
+    try:
+        decimal.Decimal(decimal_string)
+        return accumulated_msgs
+    except Exception:
+        return add_error_msg(accumulated_msgs, "Line %d contains an incorrect decimal value (%s) for column %s." % (line_no, decimal_string, column))
+
+
+def validate_email(line_no, email, accumulated_msgs):
+    if not (VALID_EMAIL_RE.match(email)):
+        return add_error_msg(accumulated_msgs, "Line %d contains an invalid email address (%s).  " % (line_no, email))
+    elif len(email) > EMAIL_MAX_LEN:
+        return add_error_msg(accumulated_msgs, "Line %d contains an email address (%) that is longer than the maximum length, %d characters." % (line_no, email))
+    return accumulated_msgs
+
+
+accumulated_msgs = ""
+# Parse the input file, skipping the header, and validating
+# that each data line consists of 31 comma-separated items.
+with open(args.input, "r") as ih:
+    for i, line in enumerate(ih):
+        if i == 0:
+            # Skip the header.
+            continue
+        # Keep 1-based line value for error messages.
+        line_no = i + 1
+        line = line.rstrip("\r\n")
+        if i > 97:
+            accumulated_msgs = add_error_msg(accumulated_msgs, "The input file contains more than 97 lines (must be 1 header line and no more than 96 data lines).")
+            stop_error(accumulated_msgs)
+        items = line.split("\t")
+        if len(items) != 32:
+            accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains %s columns, (must be 32)." % (line_no, len(items)))
+            stop_error(accumulated_msgs)
+        # Required and validated.
+        # Required.
+        user_specimen_id = items[0]
+        if len(user_specimen_id) == 0:
+            accumulated_msgs = empty_value(line_no, "user_specimen_id", accumulated_msgs)
+        # Optional.
+        field_call = items[1]
+        # Optional.
+        bcoral_genet_id = items[2]
+        # Optional.
+        bsym_genet_id = items[3]
+        # Required.
+        reef = items[4]
+        if len(reef) == 0:
+            accumulated_msgs = empty_value(line_no, "reef", accumulated_msgs)
+        # Required.
+        region = items[5]
+        if len(region) == 0:
+            accumulated_msgs = empty_value(line_no, "region", accumulated_msgs)
+        # Required and validated.
+        latitude = items[6]
+        accumulated_msgs = validate_decimal(line_no, latitude, "latitude", accumulated_msgs)
+        # Required and validated.
+        longitude = items[7]
+        accumulated_msgs = validate_decimal(line_no, longitude, "longitude", accumulated_msgs)
+        # Optional.
+        geographic_origin = items[8]
+        # Optional.
+        colony_location = items[9]
+        # Optional.
+        depth = items[10]
+        # Optional.
+        disease_resist = items[11]
+        # Optional.
+        bleach_resist = items[12]
+        # Optional.
+        mortality = items[13]
+        # Optional.
+        tle = items[14]
+        # Optional.
+        spawning = string_as_boolean_string(items[15])
+        # Required.
+        collector_last_name = items[16]
+        if len(collector_last_name) == 0:
+            accumulated_msgs = empty_value(line_no, "collector_last_name", accumulated_msgs)
+        # Required.
+        collector_first_name = items[17]
+        if len(collector_first_name) == 0:
+            accumulated_msgs = empty_value(line_no, "collector_first_name", accumulated_msgs)
+        # Required.
+        org = items[18]
+        if len(org) == 0:
+            accumulated_msgs = empty_value(line_no, "org", accumulated_msgs)
+        # Required and validated.
+        collection_date = items[19]
+        accumulated_msgs = validate_date_string(line_no, collection_date, "collection_date", accumulated_msgs)
+        # Required and validated.
+        contact_email = items[20]
+        accumulated_msgs = validate_email(line_no, contact_email, accumulated_msgs)
+        # Required.
+        seq_facility = items[21]
+        if len(seq_facility) == 0:
+            accumulated_msgs = empty_value(line_no, "seq_facility", accumulated_msgs)
+        # Optional.
+        array_version = items[22]
+        # Optional.
+        public = string_as_boolean_string(items[23])
+        # Optional.
+        public_after_date = items[24]
+        accumulated_msga = validate_date_string(line_no, public_after_date, "public_after_date", accumulated_msgs)
+        # Required and validated.
+        sperm_motility = items[25]
+        accumulated_msgs = validate_decimal(line_no, sperm_motility, "sperm_motility", accumulated_msgs)
+        # Required and validated.
+        healing_time = items[26]
+        accumulated_msgs = validate_decimal(line_no, healing_time, "healing_time", accumulated_msgs)
+        # Optional.
+        dna_extraction_method = items[27]
+        # Optional.
+        dna_concentration = items[28]
+        # If dna_concentration has a value, then it must be decimal.
+        if len(dna_concentration) > 0:
+            accumulated_msgs = validate_decimal(line_no, dna_concentration, "dna_concentration", accumulated_msgs)
+        # Optional.
+        registry_id = items[29]
+        # Optional.
+        result_folder_name = items[30]
+        # Optional.
+        plate_barcode = items[31]
+
+
+if len(accumulated_msgs) > 0:
+    stop_error(accumulated_msgs)
+
+shutil.copyfile(args.input, args.output)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/validate_affy_metadata.xml	Thu Aug 15 13:17:41 2019 -0400
@@ -0,0 +1,75 @@
+<tool id="validate_affy_metadata" name="Validate Affymetrix metadata" version="1.0.0">
+    <description>for 96 well plate</description>
+    <command detect_errors="exit_code"><![CDATA[
+python '$__tool_directory__/validate_affy_metadata.py'
+--input '$input'
+--output '$output']]></command>
+    <inputs>
+        <param name="input" type="data" format="tabular" label="Affymetrix 96 well plate metadata file">
+            <validator type="expression" message="96 well plate data must have 32 columns and no more than 96 lines of data"><![CDATA[value is not None and value.metadata.columns==32 and value.metadata.data_lines<=96]]></validator>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output" format="tabular"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="affy_metadata.tabular" ftype="tabular"/>
+            <output name="output" file="affy_metadata.tabular" ftype="tabular"/>
+        </test>
+    </tests>
+    <help>
+**What it does**
+
+Validates an Affymetrix metadata file for 96 well plate data.  These files consist of 32 columns and no more than 96 data lines.
+The tool will output the input file if it is valid.
+
+-----
+
+**Columns**
+
+ * user_specimen_id
+ * field_call
+ * bcoral_genet_id
+ * bsym_genet_id
+ * reef
+ * region
+ * latitude
+ * longitude
+ * geographic_origin
+ * colony_location
+ * depth
+ * disease_resist
+ * bleach_resist
+ * mortality
+ * tle
+ * spawning
+ * collector_last_name
+ * collector_first_name
+ * org
+ * collection_date
+ * contact_email
+ * seq_facility
+ * array_version
+ * public
+ * public_after_date
+ * sperm_motility
+ * healing_time
+ * dna_extraction_method
+ * dna_concentration
+ * registry_id
+ * result_folder_name
+ * plate_barcode
+    </help>
+    <citations>
+        <citation type="bibtex">
+            @misc{None,
+            journal = {None},
+            author = {Baums I},
+            title = {Manuscript in preparation},
+            year = {None},
+            url = {http://baumslab.org}
+        </citation>
+    </citations>
+</tool>
+