 	<cfset temp = queryAddColumn(q, "agent", "VarChar", collAr)>
 	<cfset temp = queryAddColumn(q, "agent_id", "VarChar", colIdAr)>
 	<cfset temp = queryAddColumn(q, "formatted_parts", "VarChar", pAr)>
+	<cfset temp = queryAddcolumn(q, "formatted_sex", "VarChar", sexAr)>
 	<cfreturn q>
 </cffunction>
 

		<cfset tissueP = find("tissue", parts)>
		<cfset skinP = find("skin", parts)>
		<cfset wholeOrgP = find("whole organism", parts)>
		
		<cfif collection_cde is "Mamm">
			<cfif parts is not "tissues">

		</cfif>
		
		<cfset pAr[i] = "#parts#">
		
		<!--- Sex --->
		<cfset formatted_sex = "#sex#">
		<cfset formatted_sex = "#replace(sex, 'female', 'F')#">
		<cfset formatted_sex = "#replace(sex, 'male', 'M')#">
		<cfif formatted_sex is 'unknown' or formatted_sex is 'recorded as unknwon' or formatted_sex is 'not recorded'>
			<cfset formatted_sex = 'U'>
		</cfif>
				
		<cfset sexAr[i] = "#formatted_sex#">
		
		<cfset i = i+1>
	</cfloop>
