EnhancedVolcano generates "Error in `geom_text()...compute_geom_1()...`geom_text()` requires the following missing aesthetics: label" - ggplot2

From a RNAseq file.count, I run a DESeqDataSetFromMatrix followed by a DESeq then a lfcShrink (type="apeglm"). Everything works fine a triplicate and its control, but for another triplicate (really similar in term of str and metadata) it just does not work. It generates the following error:
dds_TAX <- DESeqDataSetFromMatrix(countData = counts_TAX,
colData = colData_TAX,
design = ~ condition + replicate)
dds_TAX <- DESeq(dds_TAX)
resLFC_TAX <- lfcShrink(dds_TAX, coef="condition_TAX_vs_Ctrl", type="apeglm")
EnhancedVolcano(resLFC_TAX,
lab = rownames(resLFC_TAX),
x = 'log2FoldChange',
y = 'pvalue')
Error in `geom_text()`:
! Problem while setting up geom.
ℹ Error occurred in the 4th layer.
Caused by error in `compute_geom_1()`:
! `geom_text()` requires the following missing aesthetics: label
I compared the two dataset but nothing seems really different between the one working and this one. I had a look on the function compute_geom_1(). It asks a self and data. It seems that the error message appears when it can not find the data. I tried several combinations, the error appears even without the lfcShrink (using results function instead). The structure of the colData and counts are exactly the same. I just can't see where the error could be. If you have any clue, it would be really helpful.
Thanks!
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=fr_FR.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggsci_2.9 DESeq2_1.36.0 SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.1
[6] matrixStats_0.63.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.4 IRanges_2.30.1 S4Vectors_0.34.0
[11] BiocGenerics_0.42.0 gridExtra_2.3 forcats_0.5.2 stringr_1.5.0 dplyr_1.0.10
[16] purrr_1.0.0 readr_2.1.3 tidyr_1.2.1 tibble_3.1.8 tidyverse_1.3.2
[21] EnhancedVolcano_1.13.2 ggrepel_0.9.2 ggplot2_3.4.0
loaded via a namespace (and not attached):
[1] readxl_1.4.1 backports_1.4.1 plyr_1.8.8 splines_4.2.2 BiocParallel_1.30.4 usethis_2.1.6
[7] digest_0.6.29 htmltools_0.5.4 fansi_1.0.4 magrittr_2.0.3 memoise_2.0.1 googlesheets4_1.0.1
[13] tzdb_0.3.0 remotes_2.4.2 Biostrings_2.64.1 annotate_1.74.0 modelr_0.1.10 bdsmatrix_1.3-6
[19] prettyunits_1.1.1 colorspace_2.1-0 blob_1.2.3 rvest_1.0.3 apeglm_1.18.0 haven_2.5.1
[25] xfun_0.35 callr_3.7.3 crayon_1.5.2 RCurl_1.98-1.9 jsonlite_1.8.4 genefilter_1.78.0
[31] survival_3.4-0 glue_1.6.2 gtable_0.3.1 gargle_1.2.1 zlibbioc_1.42.0 XVector_0.36.0
[37] DelayedArray_0.22.0 pkgbuild_1.4.0 scales_1.2.1 mvtnorm_1.1-3 DBI_1.1.3 miniUI_0.1.1.1
[43] Rcpp_1.0.10 xtable_1.8-4 emdbook_1.3.12 bit_4.0.4 profvis_0.3.7 htmlwidgets_1.6.0
[49] httr_1.4.4 RColorBrewer_1.1-3 ellipsis_0.3.2 urlchecker_1.0.1 pkgconfig_2.0.3 XML_3.99-0.13
[55] farver_2.1.1 dbplyr_2.2.1 locfit_1.5-9.6 utf8_1.2.2 tidyselect_1.2.0 labeling_0.4.2
[61] rlang_1.0.6 later_1.3.0 AnnotationDbi_1.58.0 munsell_0.5.0 cellranger_1.1.0 tools_4.2.2
[67] cachem_1.0.6 cli_3.6.0 generics_0.1.3 RSQLite_2.2.19 devtools_2.4.5 broom_1.0.2
[73] evaluate_0.19 fastmap_1.1.0 yaml_2.3.6 processx_3.8.0 knitr_1.41 bit64_4.0.5
[79] fs_1.5.2 KEGGREST_1.36.3 mime_0.12 xml2_1.3.3 compiler_4.2.2 rstudioapi_0.14
[85] curl_4.3.3 png_0.1-8 reprex_2.0.2 geneplotter_1.74.0 stringi_1.7.8 ps_1.7.2
[91] desc_1.4.2 lattice_0.20-45 Matrix_1.5-1 vctrs_0.5.2 pillar_1.8.1 lifecycle_1.0.3
[97] bitops_1.0-7 httpuv_1.6.7 R6_2.5.1 promises_1.2.0.1 sessioninfo_1.2.2 codetools_0.2-18
[103] MASS_7.3-58.1 assertthat_0.2.1 pkgload_1.3.2 rprojroot_2.0.3 withr_2.5.0 GenomeInfoDbData_1.2.8
[109] parallel_4.2.2 hms_1.1.2 grid_4.2.2 coda_0.19-4 rmarkdown_2.19 googledrive_2.0.0
[115] bbmle_1.0.25 numDeriv_2016.8-1.1 shiny_1.7.4 lubridate_1.8.0

Related

Hive box is empty after reading all the values

NOTE: This is my first stack question so i beg your pardon if i did something wrong here!
I am working on an e-commerce application, and i am using hive to function as cart storage if there is no account to store the items locally until account is added. I have worked wih hive multiple times and i looked in my previous problems to check if i'm wrong anywhere but in vain.
OfflineCartItem is an adapter, it is registered, hive is initialized and box named 'cart' is opened beforehand, no errors related that.
Adding an item
Hive.box<OfflineCartItem>('cart').add(
OfflineCartItem(...));
Listing the data
ValueListenableBuilder(
valueListenable:
Hive.box<OfflineCartItem>('cart').listenable(),
builder: (context, data, snapshot) {
print("length of box: ${data.length}");
log("keys: ${data.keys}");
log("Map: ${data.toMap()}");
List<CartItem> list = [];
data.toMap().forEach((key, value) {
list.add(CartItem(...));
});
log("keys: ${data.keys}");
log("Map: ${data.toMap()}");
return Column(
mainAxisSize: MainAxisSize.min,
children: list,
);
});
I checked the hive functionality in other projects of mine, upgraded hive related packages to the lastest version, and they are working fine.
Here's the output i am getting when listing the data using the code above
I/flutter (26340): length of box: 4
[log] keys: (22, 23, 24, 25)
[log] Map: {22: Instance of 'OfflineCartItem', 23: Instance of 'OfflineCartItem', 24: Instance of 'OfflineCartItem', 25: Instance of 'OfflineCartItem'}
[log] keys: ()
[log] Map: {}
I/flutter (26340): length of box: 0
[log] keys: ()
[log] Map: {}
[log] keys: ()
[log] Map: {}
I checked and the adding code is being executed!
Here the length of the box is 4, i used box.toMap() to print the contents, but after reading all the data using data.keys and data.toMap(), the values are gone and i am left with an empty page.
Removed the data.keys and toMap() so the forEach method would access the data first, the list now had the data. Got this response
I/flutter (26340): length of box: 3
I/flutter (26340): [CartItem, CartItem, CartItem]
[log] keys: ()
[log] Map: {}
I/flutter (26340): length of box: 0
I/flutter (26340): []
[log] keys: ()
[log] Map: {}
The valueListenable again removes all the data since the values in the box changed and i am again left with an empty list.
I am using a real device, Redmi 6 pro, MIUI 12.

Perl6 NativeCall with Str is encoded('utf16') got randomly corrupted result

I am mapping the GetFullPathName windows API in a perl6 script using NativeCall, for so I wrote the following:
#!perl6
use NativeCall;
constant \WIN32_MAX_PATH = 260;
#I may use directly $path.IO.absolute()
sub Win32-GetFullPathName(
Str $lpFileName is encoded('utf16'),
int32 $nBufferLength,
#Str $lpBuffer is encoded('utf16') is rw,
Blob $lpBuffer is rw,
Str $lpFilenameIndex is rw)
returns int32
is native('kernel32.dll')
is symbol('GetFullPathNameW')
{ * }
my $path = '.';
my $fp-size = Win32-GetFullPathName(
$path, # $path ~ "\0", # <!-- this hack make it working fine
WIN32_MAX_PATH,
#my Str $fpath = ' ' x WIN32_MAX_PATH;
my $buffer = buf16.allocate(WIN32_MAX_PATH),
Str );
put "[$fp-size] => ", $buffer.decode('utf16').substr(0, $fp-size);
The code is working randomly, until I append a "\0" after $path.
[EDIT] The results when called multiple times:
[12] => D:\dev\pa.t
[12] => D:\dev\pa.
[12] => D:\dev\pa.槟
[9] => D:\dev\pa
[9] => D:\dev\pa
Is there another proper way to do it?
I suspect a MoarVM bug in src/strings/utf16.c, in particular line 403:
result = MVM_realloc(result, *output_size);
which should probably read
result = MVM_realloc(result, *output_size + 2);
If you could verify that this fixes your problem, feel free to file a bug report or even create a pull request.

SQLScriptPreparer NullPointerException

We have successfully executed the DatabaseTablesPreparer and inited the tables in the DB, but when we try to init the indexes on the table with SQLScriptPreparer, we get the following exception:
ES1 dbinit [] [] com.intershop.platform.cartridge.internal.CartridgeImpl [] [] [] [] "main" Neither Ivy descriptor nor cartridge properties found for cartridge 'app_core_a1'!
ES1 dbinit [] [app_core_a1:Class1 DatabaseIndexesPreparer [hr/a1/core/dbinit/scripts/dbindex.ddl] Version:null] com.intershop.beehive.core.dbinit.preparer.database.DatabaseIndexesPreparer [] [] [] [] "main" [core] Exception java.lang.NullPointerException: null
at com.intershop.beehive.core.dbinit.preparer.database.SQLScriptPreparer.getCommand(SQLScriptPreparer.java:158)
at com.intershop.beehive.core.dbinit.preparer.database.SQLScriptPreparer.process(SQLScriptPreparer.java:353)
We had the similar problem with DatabaseTablesPreparer (Cartridge was null), and we solved it by adding cartridge.properties file, but now we are getting the same error ("Neither Ivy descriptor nor cartridge properties found for cartridge 'app_core_a1'") even though the cartridge properties file is defined.
There are the lines in decompiled preparer code where the null pointer exception occurs:
getCartridge().getVersion() + (getCartridge().getBuild().isEmpty() ? "" : new StringBuilder().append(".").append(getCartridge().getBuild()).toString()) };
This is the preparer from dbinit.properties:
Class1 = com.intershop.beehive.core.dbinit.preparer.database.DatabaseIndexesPreparer \
hr/a1/core/dbinit/scripts/dbindex.ddl
And this is the dbinit command we are executing:
dbinit.bat --exec-id=app_core_a1:Class1
DatabaseTablesPreparer from the same cartridge, defined in the same dbinit executes successfully.
Problem was fixed by publishing cartridge. It seems that ivy descriptor was deleted and it had to be republished.

Custom Linux distro - mono runtime not found

I am trying to add mono to core-image-minimal for P202RDB custom Linux distro. Here is my bblayers.conf file:
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta-yocto \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta-yocto-bsp \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/meta-freescale \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/meta-freescale-internal \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/meta-freescale-extra \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/meta-mono \
"
BBLAYERS_NON_REMOVABLE ?= " \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta \
/home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta-yocto \
"
Now, when I try to build image using bitbake core-image-minimal, I get following output from it:
Loading cache: 100% |##############################################################################################################| ETA: 00:00:00
Loaded 1496 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Debian-8.6"
TARGET_SYS = "powerpc-fsl-linux-gnuspe"
MACHINE = "p2020rdb"
DISTRO = "fsl-qoriq"
DISTRO_VERSION = "1.9"
TUNE_FEATURES = "m32 spe ppce500v2"
TARGET_FPU = "ppc-efd"
meta
meta-yocto
meta-yocto-bsp = "(detachedfromb74ea96):ddf114933ccfc6e3ce51a10e8e8f95e514b73578"
meta-freescale = "(detachedfrom7fb32a2):7fb32a20983a0ebd5503eb42e851550b0deb8679"
meta-freescale-internal = "(detachedfrom220bff8):220bff8b2030e5af7393b5870d74c6f0af0d76d1"
meta-freescale-extra = "(nobranch):ced26c806cb566b1400a2f4f26a94d8d44d13233"
meta-mono = "daisy:f01b4f7a98d07abcf4c1f845c057199e112fb7d6"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1248 tasks of which 1248 didn't need to be rerun and all succeeded.
It seems mono repository is found, then I prepare SD card using this image and it boots without problems on target board, however, mono command is not available. What am I missing?
Add
IMAGE_INSTALL_append = " mono"
to your local.conf. Just adding a layer doesn't add any package to your image.
Even better, create your own image, and add mono to IMAGE_INSTALL in that recipe.

Select a field with multiple where clause

I need to select a field with multiple where clause. The below query causes a syntax error.
String selectquery="SELECT" +KEY_EXPAMT+ "FROM" +TABLE_EXP+ "WHERE"
+KEY_EXPCAT+ "='" +String.valueOf(cat)+ "'AND " +KEY_EXPMONTH+ "='"
+String.valueOf(month)+ "' AND " +KEY_EXPYEAR+ "='" +String.valueOf(year)+ "'
AND " +KEY_EXPFROM+ "='" +String.valueOf(from)+"'";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(selectquery, new String[]{cat, month,year,from});
logcat:
03-20 15:01:36.606 19106-19125/com.expense.javed.expensetrackingsystem D/OpenGLRenderer﹕ Render dirty regions requested: true
03-20 15:01:36.623 19106-19106/com.expense.javed.expensetrackingsystem D/Atlas﹕ Validating map...
03-20 15:01:36.680 19106-19125/com.expense.javed.expensetrackingsystem I/Adreno-EGL﹕ : EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.04.04.02.162.107_msm8226_LA.BF.1.1__release_AU ()
OpenGL ES Shader Compiler Version: E031.25.01.03
Build Date: 10/28/14 Tue
Local Branch:
Remote Branch: quic/l_LNX.LA.3.6
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.04.04.02.162.107 + cb93e16 + f50fe49 + d7c18e6 + 5b9a565 + 0f3a25d + 607156e + 75511aa + e4d16c0 + 686f3eb + 211a271 + dd281ee + NOTHING
03-20 15:01:36.683 19106-19125/com.expense.javed.expensetrackingsystem I/OpenGLRenderer﹕ Initialized EGL, version 1.4
03-20 15:01:36.762 19106-19125/com.expense.javed.expensetrackingsystem D/OpenGLRenderer﹕ Enabling debug mode 0
03-20 15:01:48.482 19106-19106/com.expense.javed.expensetrackingsystem I/Choreographer﹕ Skipped 30 frames! The application may be doing too much work on its main thread.
03-20 15:01:48.494 19106-19125/com.expense.javed.expensetrackingsystem V/RenderScript﹕ Application requested CPU execution
03-20 15:01:48.507 19106-19125/com.expense.javed.expensetrackingsystem V/RenderScript﹕ 0xb862fc90 Launching thread(s), CPUs 4
03-20 15:02:13.932 19106-19106/com.expense.javed.expensetrackingsystem E/SQLiteLog﹕ (1) near "SELECTexpenseamountFROMexpenseWHEREexpensecategory": syntax error
03-20 15:02:13.946 19106-19106/com.expense.javed.expensetrackingsystem D/AndroidRuntime﹕ Shutting down VM
03-20 15:02:13.962 19106-19106/com.expense.javed.expensetrackingsystem E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.expense.javed.expensetrackingsystem, PID: 19106
android.database.sqlite.SQLiteException: near "SELECTexpenseamountFROMexpenseWHEREexpensecategory": syntax error (code 1): , while compiling: SELECTexpenseamountFROMexpenseWHEREexpensecategory='food'AND expensemonth='march' AND expenseyear='2015' AND expensefrom='InBank'
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255)
at com.expense.javed.expensetrackingsystem.SqlLiteDb.updateExpense(SqlLiteDb.java:122)
at com.expense.javed.expensetrackingsystem.ExpensingAmountActivity$4$1.onClick(ExpensingAmountActivity.java:145)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:160)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
03-20 15:02:15.674 19106-19106/com.expense.javed.expensetrackingsystem I/Process﹕ Sending signal. PID: 19106 SIG: 9
03-20 15:02:16.502 20366-20387/com.expense.javed.expensetrackingsystem D/OpenGLRenderer﹕ Render dirty regions requested: true
03-20 15:02:16.518 20366-20366/com.expense.javed.expensetrackingsystem D/Atlas﹕ Validating map...
03-20 15:02:16.576 20366-20387/com.expense.javed.expensetrackingsystem I/Adreno-EGL﹕ : EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.04.04.02.162.107_msm8226_LA.BF.1.1__release_AU ()
OpenGL ES Shader Compiler Version: E031.25.01.03
Build Date: 10/28/14 Tue
Local Branch:
Remote Branch: quic/l_LNX.LA.3.6
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.04.04.02.162.107 + cb93e16 + f50fe49 + d7c18e6 + 5b9a565 + 0f3a25d + 607156e + 75511aa + e4d16c0 + 686f3eb + 211a271 + dd281ee + NOTHING
03-20 15:02:16.578 20366-20387/com.expense.javed.expensetrackingsystem I/OpenGLRenderer﹕ Initialized EGL, version 1.4
03-20 15:02:16.609 20366-20387/com.expense.javed.expensetrackingsystem D/OpenGLRenderer﹕ Enabling debug mode 0
Don't do that. Your code is vulnerable to an SQL injection attack. You should really use prepared statements with ? placeholders for the values, and then set the values later. Or, at a minimum, you should escape the strings properly. To learn about SQL injection, see http://en.wikipedia.org/wiki/SQL_injection
However, as for your error, I think this says it all:
"SELECTexpenseamountFROMexpenseWHEREexpensecategory='food'AND expensemonth='march' AND expenseyear='2015' AND expensefrom='InBank'"
You are missing spaces in your query.