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

PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "type_id" violates not-null constraint #55

Open
cornellyujy opened this issue Feb 21, 2022 · 6 comments

Comments

@cornellyujy
Copy link

cornellyujy commented Feb 21, 2022

Hi @carolyncaron , when I loaded the genotype data into chado table, I noticed there is something wrong with the 'type_id', and maybe it does not insert into table automatically. I am not sure why? and except that please help me to check if I have other error. Thanks~
Here is the output information from console:
###########################################################################################
23
Please enter a free-text title that describes the type of variants in the file (eg. SNP, MNP, indel).: SNP
Please enter a free-text title that describes the marker technology used to generate the genotypes in the file (e.g. "Exome Capture", "GBS", "KASPar", etc.).: GBS
Please provide the name of a project in which all genotypes will be grouped to allow users to specify a particular dataset.: Cucurbita pepo Demonstration Genotypic Data
Begin validating options and samples...
Loading your data according to the "Genotype Call Custom Table" Method.
Found organism "Cucurbita pepo" in the database.
Found project "Cucurbita pepo Demonstration Genotypic Data" in the database.
Checking for samples [Insert And Select] and for germplasm [Insert And Select] in the database...
Successfully mapped stocks and germplasm.
Detected genotype matrix file format.
Proceeding to load genotypes...
Number of lines to process: 4156
PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "type_id" violates not-null constraint [error]
DETAIL: Failing row contains (17731266, null, 7, Cp4.1LG01:1198, Cp4.1LG01:1198, null, null, null, null, f, f, 2022-02-21 15:53:39.608159, 2022-02-21 15:53:39.608159). in
/var/www/html/v2/includes/database/database.inc:2278
Stack trace:
#0 /var/www/html/v2/includes/database/database.inc(2278): PDOStatement->execute(Array)
#1 /var/www/html/v2/includes/database/pgsql/database.inc(111): DatabaseStatementBase->execute(Array, Array)
#2 /var/www/html/v2/includes/database/database.inc(2457): DatabaseConnection_pgsql->query('INSERT INTO cha...', Array, Array)
#3 /var/www/html/v2/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1783): db_query('INSERT INTO cha...', Array, Array)
#4 /var/www/html/v2/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(637): chado_query('INSERT INTO cha...', Array)
#5 /var/www/html/v2/sites/all/modules/genotypes_loader/api/genotypes_loader.api.inc(104): chado_insert_record('feature', Array)
#6 /var/www/html/v2/sites/all/modules/genotypes_loader/includes/genotypes_loader.genotype_matrix.inc(130): genotypes_loader_helper_add_record_with_mode('Variant', 'feature', 2, Array)
#7 /var/www/html/v2/sites/all/modules/genotypes_loader/genotypes_loader.drush.inc(469): genotypes_loader_load_matrix('/var/www/html/C...', Array, Array)
#8 /var/www/html/v2/sites/all/modules/genotypes_loader/genotypes_loader.drush.inc(172): genotypes_loader_load_genotypes('/var/www/html/C...', '/var/www/html/C...', Array)
#9 phar:///usr/local/bin/drush/includes/command.inc(422): drush_genotypes_loader_load_genotypes('/var/www/html/C...', '/var/www/html/C...')
#10 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#11 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('Cpepo.table.tsv', 'samples.list')
#12 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#13 phar:///usr/local/bin/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#14 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main()
#15 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
#16 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#17 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#18 {main}
##################################################################################

@carolyncaron
Copy link
Member

Hello again! Thank you for sharing your error output. I've seen this error before, and there are a couple of issues with uploading using the genotype matrix format right now. I've been working on fixing these over the past week, and I expect to be finished by the end of this week. I will notify you here as soon as those fixes are good to go!

@cornellyujy
Copy link
Author

Hi @carolyncaron , I gave up to load matrix.tsv and sample.list into chado tables. The loading of vcf and sample.list works well. Thanks~

@carolyncaron
Copy link
Member

Hi @cornellyujy, I have not pushed any changes yet for loading the matrix format. I want to ensure that all the tables the loader touches are populated appropriately, and it is taking me longer than anticipated to validate them.

@cornellyujy
Copy link
Author

cornellyujy commented Mar 3, 2022

Thanks @carolyncaron , Yep, I understood it will spend a long time to validate it. In the manual, this module can load three kinds of data. If one type works well, it's enough for running. Thank you so much!

@cornellyujy
Copy link
Author

Hi @carolyncaron , I ran this command: drush load-genotypes sample.vcf samples.list --organism="Citrus sinensis"
--variant-type="SNP" --marker-type="genetic_marker"
--project-name="Citrus Demonstration Genotypic Data"
After done, I noticed that genotype_call table was empty, so anything wrong?
Thanks~

@carolyncaron
Copy link
Member

Hi @cornellyujy, yes that is concerning! Did you notice any other output on the command line after running the command? Can you check the feature table to see if your markers and variants are there?

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

2 participants