Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Populating the expression_feature MView #401

Open
spficklin opened this issue Feb 27, 2022 · 0 comments
Open

Error Populating the expression_feature MView #401

spficklin opened this issue Feb 27, 2022 · 0 comments

Comments

@spficklin
Copy link
Member

When populating the expression_feature MView I get the following error message:

WD tripal_mviews: PDOException: SQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type [error]
character varying(255): INSERT INTO chado.expression_feature (SELECT DISTINCT(F.feature_id) AS feature_id,  
O.organism_id AS organism_id,   F.uniquename AS feature_uniquename,   O.common_name AS organism_common_name,   ( 
   SELECT string_agg(DXR.accession, ',') AS accession FROM feature_cvterm FC       INNER JOIN cvterm CVT ON
CVT.cvterm_id = FC.cvterm_id       INNER JOIN dbxref DXR ON DXR.dbxref_id = CVT.dbxref_id       WHERE
F.feature_id = FC.feature_id   ) AS accession   FROM feature F   INNER JOIN organism O ON F.organism_id =
O.organism_id   INNER JOIN element E ON E.feature_id = F.feature_id   INNER JOIN elementresult ER ON
ER.element_id = E.element_id   INNER JOIN quantification Q ON Q.quantification_id = ER.quantification_id   INNER
JOIN acquisition AC ON AC.acquisition_id = Q.acquisition_id   INNER JOIN assay A ON A.assay_id = AC.assay_id  
INNER JOIN assay_biomaterial AB ON AB.assay_id = A.assay_id   INNER JOIN biomaterial B ON B.biomaterial_id =
AB.biomaterial_id); Array
(
)

The problem is this part of the SQL that populates the table:

  (
    SELECT string_agg(DXR.accession, ',') AS accession FROM feature_cvterm FC
      INNER JOIN cvterm CVT ON CVT.cvterm_id = FC.cvterm_id
      INNER JOIN dbxref DXR ON DXR.dbxref_id = CVT.dbxref_id
      WHERE F.feature_id = FC.feature_id
  ) AS accession

It's combining all of accession for the feature CVterms into a single list that can't exceed 225 characters. This should really be a textfield. Some of my features have a lot of annotations and this exceeds the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant