 <cfif isdefined("diploid_number") and len(diploid_number) gt 0>
   <cfset mapurl = "#mapurl#&diploid_number=#diploid_number#">
   <cfif compare(diploid_number,"NULL") is 0>
-      <cfset basQual = " #basQual# AND ConcatAttributeValue(flat.collection_object_id,"diploid_number") is null">
+      <cfset basQual = " #basQual# AND ConcatAttributeValue(flat.collection_object_id,'diploid_number') is null">
   <cfelse>
     <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_diploid_number ON (#session.flatTableName#.collection_object_id = tbl_diploid_number.collection_object_id)">
     <cfset basQual = " #basQual# AND tbl_diploid_number.attribute_type = 'diploid number'">

<cfif isdefined("verbatim_host_sex") and len(verbatim_host_sex) gt 0>
  <cfset mapurl = "#mapurl#&verbatim_host_sex=#verbatim_host_sex#">
  <cfif compare(verbatim_host_sex,"NULL") is 0>
      <cfset basQual = " #basQual# AND ConcatAttributeValue(flat.collection_object_id,"verbatim_host_sex") is null">
  <cfelse>
    <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_verbatim_host_sex ON (#session.flatTableName#.collection_object_id = tbl_verbatim_host_sex.collection_object_id)">
    <cfset basQual = " #basQual# AND tbl_verbatim_host_sex.attribute_type = 'verbatim host sex'">

<cfif isdefined("fat_deposition") and len(fat_deposition) gt 0>
  <cfset mapurl = "#mapurl#&fat_deposition=#fat_deposition#">
  <cfif compare(fat_deposition,"NULL") is 0>
      <cfset basQual = " #basQual# AND ConcatAttributeValue(flat.collection_object_id,'fat_deposition') is null">
  <cfelse>
    <cfset basJoin = " #basJoin# INNER JOIN v_attributes tbl_fat_deposition ON (#session.flatTableName#.collection_object_id = tbl_fat_deposition.collection_object_id)">
    <cfset basQual = " #basQual# AND tbl_fat_deposition.attribute_type = 'fat deposition'">
