chatGPT repeatly make mistake for shap summary plot.
for different class label, the index should be the 3rd position: shap_vals[:,:,idx],
This site is to serve as my note-book and to effectively communicate with my students and collaborators. Every now and then, a blog may be of interest to other researchers or teachers. Views in this blog are my own. All rights of research results and findings on this blog are reserved. See also http://youtube.com/c/hongqin @hongqin
chatGPT repeatly make mistake for shap summary plot.
for different class label, the index should be the 3rd position: shap_vals[:,:,idx],
In Mendely, if an article has unspecified type, it often list it as "preprint".
To fix this, just change the document type to 'jounral article' or 'conference proceedings' or other appropriate type.
chatgpt: To compare two PDF files for differences, you have several options:
There are tools specifically designed for PDF comparison, such as:
There are free and paid online services for comparing PDFs:
If you'd like to script the comparison, you can use Python libraries like PyPDF2
, pdfplumber
, or pdfdiff
. Here's an example:
from PyPDF2 import PdfReader
# Function to extract text from a PDF file
def extract_text_from_pdf(pdf_path):
reader = PdfReader(pdf_path)
text = ""
for page in reader.pages:
text += page.extract_text()
return text
# Compare two PDFs
pdf1_text = extract_text_from_pdf("file1.pdf")
pdf2_text = extract_text_from_pdf("file2.pdf")
if pdf1_text == pdf2_text:
print("The PDF files are identical.")
else:
print("The PDF files have differences.")
diff
or vimdiff
.
hqin@Hong-MBP2 Downloads % diff-pdf -v file1.pdf file2.pdf
page 0 has 3756 pixels that differ
page 0 differs
page 1 has 369491 pixels that differ
page 1 differs
page 2 has 0 pixels that differ
page 3 has 0 pixels that differ
page 4 has 0 pixels that differ
page 5 has 0 pixels that differ
page 6 has 0 pixels that differ
page 7 has 0 pixels that differ
page 8 has 0 pixels that differ
2 of 9 pages differ.
hqin@Hong-MBP2 Downloads % diff-pdf -v overleaf-MABEL_neuralnetwork_SHAP_IEEE2024Fall.pdf /Users/hqin/Downloads/2024402761.pdf
page 0 has 3756 pixels that differ
page 0 differs
page 1 has 0 pixels that differ
page 2 has 0 pixels that differ
page 3 has 0 pixels that differ
page 4 has 0 pixels that differ
page 5 has 0 pixels that differ
page 6 has 0 pixels that differ
page 7 has 0 pixels that differ
page 8 has 0 pixels that differ
1 of 9 pages differ.
[hqin@firefly02 alphafold-2]$ bash alphafold-singularity-run.sh --fasta_paths T1050.fasta
Mounting /scr -> /mnt/data_dir
Mounting /scr/alphafold-data/uniref90 -> /mnt/uniref90_database_path
Mounting /scr/alphafold-data/mgnify -> /mnt/mgnify_database_path
Mounting /scr/alphafold-data/bfd -> /mnt/bfd_database_path
Mounting /scr/alphafold-data/uniclust30/uniclust30_2018_08 -> /mnt/uniclust30_database_path
Mounting
-> /mnt/pdb70_database_path
Mounting /scr/alphafold-data/pdb_mmcif -> /mnt/template_mmcif_dir
Mounting /scr/alphafold-data/pdb_mmcif -> /mnt/obsolete_pdbs_path
Mounting /home/hqin/alphafold-2 -> /mnt/fasta_path_0
--data_dir=/mnt/data_dir/alphafold-data --uniref90_database_path=/mnt/uniref90_database_path/uniref90.fasta --mgnify_database_path=/mnt/mgnify_database_path/mgy_clusters_2018_12.fa --bfd_database_path=/mnt/bfd_database_path/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt --uniclust30_database_path=/mnt/uniclust30_database_path/uniclust30_2018_08 --pdb70_database_path=/mnt/pdb70_database_path/pdb70 --template_mmcif_dir=/mnt/template_mmcif_dir/mmcif_files --obsolete_pdbs_path=/mnt/obsolete_pdbs_path/obsolete.dat --fasta_paths=/mnt/fasta_path_0/T1050.fasta --output_dir=/mnt/output --benchmark=0 --logtostderr --max_template_date=2021-12-31
/scr:/mnt/data_dir,/scr/alphafold-data/uniref90:/mnt/uniref90_database_path,/scr/alphafold-data/mgnify:/mnt/mgnify_database_path,/scr/alphafold-data/bfd:/mnt/bfd_database_path,/scr/alphafold-data/uniclust30/uniclust30_2018_08:/mnt/uniclust30_database_path,/scr/alphafold-data/pdb70:/mnt/pdb70_database_path,/scr/alphafold-data/pdb_mmcif:/mnt/template_mmcif_dir,/scr/alphafold-data/pdb_mmcif:/mnt/obsolete_pdbs_path,/home/hqin/alphafold-2:/mnt/fasta_path_0,/home/hqin/alphafold-2:/mnt/output
I0804 20:07:16.598631 140258065744832 templates.py:857] Using precomputed obsolete pdbs /mnt/obsolete_pdbs_path/obsolete.dat.
I0804 20:07:16.809164 140258065744832 xla_bridge.py:244] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker:
I0804 20:07:17.299607 140258065744832 xla_bridge.py:244] Unable to initialize backend 'tpu': INVALID_ARGUMENT: TpuPlatform is not available.
I0804 20:07:21.937146 140258065744832 run_alphafold.py:385] Have 5 models: ['model_1', 'model_2', 'model_3', 'model_4', 'model_5']
I0804 20:07:21.937372 140258065744832 run_alphafold.py:397] Using random seed 1266311393757702950 for the data pipeline
I0804 20:07:21.937706 140258065744832 run_alphafold.py:150] Predicting T1050
I0804 20:07:21.938605 140258065744832 jackhmmer.py:130] Launching subprocess "/usr/bin/jackhmmer -o /dev/null -A /tmp/tmp8lfb38hd/output.sto --noali --F1 0.0005 --F2 5e-05 --F3 5e-07 --incE 0.0001 -E 0.0001 --cpu 8 -N 1 /mnt/fasta_path_0/T1050.fasta /mnt/uniref90_database_path/uniref90.fasta"
I0804 20:07:21.984835 140258065744832 utils.py:36] Started Jackhmmer (uniref90.fasta) query
I0804 20:13:41.682038 140258065744832 utils.py:40] Finished Jackhmmer (uniref90.fasta) query in 379.697 seconds
I0804 20:13:44.308897 140258065744832 jackhmmer.py:130] Launching subprocess "/usr/bin/jackhmmer -o /dev/null -A /tmp/tmpqgyb_oib/output.sto --noali --F1 0.0005 --F2 5e-05 --F3 5e-07 --incE 0.0001 -E 0.0001 --cpu 8 -N 1 /mnt/fasta_path_0/T1050.fasta /mnt/mgnify_database_path/mgy_clusters_2018_12.fa"
I0804 20:13:44.343975 140258065744832 utils.py:36] Started Jackhmmer (mgy_clusters_2018_12.fa) query
I0804 20:20:40.947294 140258065744832 utils.py:40] Finished Jackhmmer (mgy_clusters_2018_12.fa) query in 416.603 seconds
I0804 20:21:01.298550 140258065744832 hhsearch.py:85] Launching subprocess "/usr/bin/hhsearch -i /tmp/tmpwk1zvn0h/query.a3m -o /tmp/tmpwk1zvn0h/output.hhr -maxseq 1000000 -d /mnt/pdb70_database_path/pdb70"
I0804 20:21:01.353056 140258065744832 utils.py:36] Started HHsearch query
I0804 20:21:01.404658 140258065744832 utils.py:40] Finished HHsearch query in 0.051 seconds
Traceback (most recent call last):
File "/app/alphafold/run_alphafold.py", line 427, in <module>
app.run(main)
File "/opt/conda/lib/python3.7/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/opt/conda/lib/python3.7/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/app/alphafold/run_alphafold.py", line 412, in main
is_prokaryote=is_prokaryote)
File "/app/alphafold/run_alphafold.py", line 164, in predict_structure
msa_output_dir=msa_output_dir)
File "/app/alphafold/alphafold/data/pipeline.py", line 179, in process
pdb_templates_result = self.template_searcher.query(uniref90_msa_as_a3m)
File "/app/alphafold/alphafold/data/tools/hhsearch.py", line 96, in query
stdout.decode('utf-8'), stderr[:100_000].decode('utf-8')))
RuntimeError: HHSearch failed:
stdout:
stderr:
- 20:21:01.404 ERROR: In /tmp/hh-suite/src/ffindexdatabase.cpp:11: FFindexDatabase:
- 20:21:01.404 ERROR: could not open file '/mnt/pdb70_database_path/pdb70_cs219.ffdata'
tryCatch fixed this running error.
i = 2677
Error in if (k < 0) stop("k negative") :
missing value where TRUE/FALSE needed
Calls: adf.test
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted
get_adf_pvalue (tb_local$era5_t2m)
Loving, Texas, There are zero cases in the time window. So, adf.test is meaningless.
tried reinstall R and packages
https://stackoverflow.com/questions/49190251/caught-segfault-memory-not-mapped-error-in-r
There was a typo in a variable name, which took 2-3 hours to fix.
# Function to get cajo test rank
get_cajo_rank = function( in_system, in_K= 12, in_cval_index=3, in_max_cajo_order=1 ) {
tryCatch (
{ test_tmp = ca.jo(in_system, type='trace', ecdet = 'const', K= in_K)
ratio_test_cvalPer = test_tmp@teststat / test_tmp@cval[,in_cval_index] #ratio of test statistics vs critical values
number_of_positive_tests = table( ratio_test_cvalPer > 1)['TRUE'] #return the number of TRUE, which can > max_cajo_order
output_rank = min( number_of_positive_tests, in_max_cajo_order ) # make sure max_cajo_order is the up limit
print(paste("get_cajo_rank():: output_rank = ", output_rank))
return(output_rank)
},
error=function(error_message) {
output_rank = -999 # an error code
return(output_rank)
})
}
Tech asked whether VirualBox or VMWare on my Apple laptop caused the wireless connection issues.
In log-in, I typed username but I cannot type in the password.
As suggested by the tech, I typed in the password first, and then my username, and it worked.
(base) hqin@CS313BQin ~ % sudo kextload -b org.virtualbox.kext.VBoxDrv
Password:
Executing: /usr/bin/kmutil load -b org.virtualbox.kext.VBoxDrv
Error Domain=KMErrorDomain Code=27 "Extension with identifiers org.virtualbox.kext.VBoxNetAdp,com.apple.nke.rvi,com.paloaltonetworks.kext.pangpd,org.virtualbox.kext.VBoxUSB,org.virtualbox.kext.VBoxDrv,org.virtualbox.kext.VBoxNetFlt not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers org.virtualbox.kext.VBoxNetAdp,com.apple.nke.rvi,com.paloaltonetworks.kext.pangpd,org.virtualbox.kext.VBoxUSB,org.virtualbox.kext.VBoxDrv,org.virtualbox.kext.VBoxNetFlt not approved to load. Please approve using System Preferences.}
(base) hqin@CS313BQin ~ %
Checked the "Security & Privacy", Restart the laptop to make the update function.
This worked, and the error went over.
job in EQW status? !
This does NOT worked for batch cointegration using Johansen test
-bash-4.2$ cat cajo.pbs
#!/bin/bash -l
#$ -S /bin/bash
#$ -N epinow_job
#$ -V
#$ -cwd
. /etc/profile.d/modules.sh
module load anaconda/5.2.0
source activate r2021nov
This runntime error seems to be just a warning, because Rt was still reported.
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
Logging threshold set at INFO for the EpiNow2 logger
Writing EpiNow2 logs to the console and: /var/folders/bw/k6_tkc2142v1wh5r_1yhkqhc0000gp/T//Rtmpb4xcT4/regional-epinow/2020-10-27.log
Logging threshold set at INFO for the EpiNow2.epinow logger
Writing EpiNow2.epinow logs to the console and: /var/folders/bw/k6_tkc2142v1wh5r_1yhkqhc0000gp/T//Rtmpb4xcT4/epinow/2020-10-27.log
WARN [2021-11-09 19:42:32] epinow: There were 2 divergent transitions after warmup. See
http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2021-11-09 19:42:32] epinow: Examine the pairs() plot to diagnose sampling problems
This bug was solved by re-install R.
https://community.rstudio.com/t/rstudio-freezing-and-qt-webengine-eating-cpu/28019