Skip to content

Instantly share code, notes, and snippets.

***** Intermediate results will be written to /corral4/main/jobs/051/733/51733115/_job_tmp/tmpwi3q3lgp in docker. ****
***** Running the command:*****
time seq 0 5 | parallel -q --halt 2 --line-buffer /opt/deepvariant/bin/make_examples --mode calling --ref "reference.fasta" --reads "reads_alignment.bam" --examples "/corral4/main/jobs/051/733/51733115/_job_tmp/tmpwi3q3lgp/make_examples.tfrecord@6.gz" --channels "insert_size" --task {}
[W::hts_idx_load3] The index file is older than the data file: reads_alignment.bam.bai
[W::hts_idx_load3] The index file is older than the data file: reads_alignment.bam.bai
[W::hts_idx_load3] The index file is older than the data file: reads_alignment.bam.bai
@mvdbeek
mvdbeek / usegalaxy_stats.sql
Last active July 7, 2023 14:00
usegalaxy.org stats for job cache talk
SELECT date_trunc('year', create_time) AS year, count(*) as created_in_year
FROM galaxy_user
WHERE purged = false and deleted = false
GROUP BY year
ORDER BY year;
-- year | created_in_year
-- ---------------------+-----------------
-- 2006-01-01 00:00:00 | 109
@mvdbeek
mvdbeek / test_fork_safe_writer.py
Last active June 8, 2023 09:44
crazy text file busy reproduction
import fcntl
import os
import stat
import subprocess
import threading
import time
import pytest
RWXR_XR_X = stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH
TASK [galaxyproject.galaxy : Install Galaxy base dependencies] **********************************************************************************************************************
fatal: [cvmfs0-psu1.galaxyproject.org]: FAILED! => {"changed": false, "cmd": ["/cvmfs/test.galaxyproject.org/venv/bin/pip", "install", "--index-url", "https://wheels.galaxyproject.org/simple/", "--extra-index-url", "https://pypi.python.org/simple", "-r", "/cvmfs/test.galaxyproject.org/galaxy/lib/galaxy/dependencies/pinned-requirements.txt"], "msg": "stdout: Looking in indexes: https://wheels.galaxyproject.org/simple/, https://pypi.python.org/simple, https://wheels.galaxyproject.org/simple\nIgnoring asynctest: markers 'python_version >= \"3.7\" and python_version < \"3.8\"' don't match your environment\nIgnoring cached-property: markers 'python_version >= \"3.7\" and python_version < \"3.8\"' don't match your environment\nIgnoring colorama: markers 'python_version >= \"3.7\" and python_version < \"3.12\" and platform_system == \"Wi
@mvdbeek
mvdbeek / debugging.md
Created March 9, 2023 10:16
Debugging workflow editor performance

I put a few timers here and there, and it turns out we correctly load up the editor steps into the store; updateStep is only called 84 times, however changeStepMapOver is being called thousands of times.

relevant diff:

diff --git a/client/src/stores/workflowStepStore.ts b/client/src/stores/workflowStepStore.ts
index ca5f05f85c..0fd672d531 100644
--- a/client/src/stores/workflowStepStore.ts
+++ b/client/src/stores/workflowStepStore.ts
import os
import subprocess
import time
from datetime import (
date,
datetime,
)
import click
import psutil
@mvdbeek
mvdbeek / explore.py
Last active October 7, 2022 11:26
playing around with xsdata and galaxy.xsd
from xsdata.formats.dataclass.parsers import XmlParser
from xsdata.formats.dataclass.parsers.config import ParserConfig
parser_config = ParserConfig(fail_on_unknown_attributes=True)
parser = XmlParser()
tool = parser.from_string("""<tool id="fastqc" name="FastQC" version="0.73+galaxy0">
<description>
Read Quality reports
</description>
@mvdbeek
mvdbeek / setup.sh
Last active August 31, 2022 13:16
slurm setup on gitpod
sudo apt install slurmd slurmctld -y
sudo chmod 777 /etc/slurm-llnl
sudo cat << EOF > /etc/slurm-llnl/slurm.conf
# slurm.conf file generated by configurator.html.
# Put this file on all nodes of your cluster.
# See the slurm.conf man page for more information.
#
@mvdbeek
mvdbeek / tus upload diagram.md
Last active July 19, 2022 14:42
High-level view of Tus uploads

flowchart LR
    A[User] -->|Upload Request with Fingerprint| B(Tus server)
    B --> |Auth Headers| C{Galaxy}
    C --> |200 OK| B
    B -->  D(Upload complete ?)
    D --> E(Yes)
    D --> F(No)
@mvdbeek
mvdbeek / forkserver.py
Last active April 28, 2022 14:56
forkserver example
import time
from multiprocessing import get_context
def import_test(log=False):
now = time.time()
from galaxy.metadata import set_metadata
if log:
print(time.time() - now)