Skip to content

Instantly share code, notes, and snippets.

View lindenb's full-sized avatar
😶
I hate people.

Pierre Lindenbaum lindenb

😶
I hate people.
View GitHub Profile
@lindenb
lindenb / README.md
Last active February 11, 2025 14:26
divide-and-conquer strategy in nextflow to call problematic regions

divide-and-conquer strategy in nextflow

Sometime some regions of the genome are hard to call to get VCF files.

The following Nextflow workflow use a divide-and-conquer strategy: if the region is hard to call - that is the process fails (here as an example in CALL_VARIANTS the region must have a length lower than 10bp) - the error is ignored (errorStrategy=ignore) , the region is divided into 10 smaller regions , and again, and again , until the caller is able complete the job.

Thanks Mahesh Binzer-Panchal for the help. https://nextflow.slack.com/archives/C02T98A23U7/p1738431084540439

Usage

@lindenb
lindenb / README.md
Last active August 15, 2024 08:05
nfcore-differentialabundance with nfcore-atacseq data

This is my notebook about how to use the pipeline from nfcore-differentialabundance https://nf-co.re/differentialabundance with nfcode-atacseq https://nf-co.re/atacseq/

The feature file

The atacseq pipeline produced the following output: /results/bwa/merged_replicate/macs2/narrow_peak/consensus/consensus_peaks.mRp.clN.annotatePeaks.txt

PeakID (cmd=annotatePeaks.pl consensus_peaks.mRp.clN.bed genome.fa -gid -gtf genes.gtf -cpu 6)	Chr	Start	End	Strand	Peak Score	Focus Ratio/Region Size	Annotation (...)
Interval_332495	chr9	124851870	124853798	+	0	NA	promoter-TSS (WDR38) (...)
Interval_128586	chr17	26937319	26937399	+	0	NA	Intergenic (...)
@lindenb
lindenb / biostar9592523.sparql
Last active April 12, 2024 19:04
https://www.biostars.org/p/9592523/ Can you suggest a protein that has two chainst but only 50 total number of atoms?
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX vg: <http://biohackathon.org/resource/vg#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX uberon: <http://purl.obolibrary.org/obo/uo#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX sp: <http://spinrdf.org/sp#>
@lindenb
lindenb / Makefile
Created April 4, 2024 10:59
Tool to Identify Gene, Regulatory Role, and Function at Integration Sites https://www.biostars.org/p/9591769/
SHELL=/bin/bash
OUTDIR=TMP
BUILD=GRCh38
all: $(OUTDIR)/database.rdf query.01.sparql
/path/to/pache-jena-4.8.0/bin/arq --data=$< --query=query.01.sparql
$(OUTDIR)/database.rdf: $(OUTDIR)/go.rdf $(OUTDIR)/gtf.rdf
mkdir -p $(dir $@)
@lindenb
lindenb / out.log
Created March 25, 2024 08:24
diff bind
(...)
> #### Occupancy Analysis ####
> png("Clustering_Occupancy.png", width= 840, height = 840)
> plot(DBsample, cexRow = 1.4, cexCol = 1.4)
> dev.off()
null device
1
>
> write("DBA COUNT", stderr())
DBA COUNT
@lindenb
lindenb / README.md
Last active February 19, 2024 12:18
compile R as library

MOTIVATION

I'm trying to compile #RStat as a static library with the -fPIC flag (so I can use it within #java #jni)

DOWNLOAD AND COMPILE

rm -rvf  "TMP/R-4.3.2" TMP/jeter.tar.gz
mkdir -p TMP/R-4.3.2/lib/
wget -O TMP/jeter.tar.gz "https://pbil.univ-lyon1.fr/CRAN/src/base/R-4/R-4.3.2.tar.gz"
cd TMP && tar xfz jeter.tar.gz && rm jeter.tar.gz &&  cd R-4.3.2 && \
@lindenb
lindenb / README.md
Last active January 11, 2025 11:40
Delete Tweets

I want to delete all my tweets without deleting my account.

This script deletes your tweets and repost from twitter without using the Twitter API, just by using the firefox javascript scratchpad.

Chage YOURNAME in the script below.

The script is quite slow but it works so far , I set some long timeout to let the DOM document to (re)load.

May be it could be much faster but I'm not a javascript guy.

@lindenb
lindenb / nextflow.log
Created October 19, 2023 17:11
nextflow cut&run. Nothing happens and .nextflow.log contains java stackTrace about aws.
Oct-19 19:04:09.799 [S3TransferManager-6] WARN c.a.i.InstanceMetadataServiceResourceFetcher - Fail to retrieve token
com.amazonaws.SdkClientException: Failed to connect to service endpoint:
at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100)
at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.getToken(InstanceMetadataServiceResourceFetcher.java:91)
at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.readResource(InstanceMetadataServiceResourceFetcher.java:69)
at com.amazonaws.internal.EC2ResourceFetcher.readResource(EC2ResourceFetcher.java:66)
at com.amazonaws.auth.InstanceMetadataServiceCredentialsFetcher.getCredentialsEndpoint(InstanceMetadataServiceCredentialsFetcher.java:60)
at com.amazonaws.auth.InstanceMetadataServiceCredentialsFetcher.getCredentialsResponse(InstanceMetadataServiceCredentialsFetcher.java:48)
at com.amazonaws.auth.BaseCredentialsFetcher.fetchCredentials(BaseCredentialsFetcher.java:124)
at com.amazonaws.auth.BaseCre
@lindenb
lindenb / main.nf
Created September 11, 2023 07:01
https://www.biostars.org/p/9574590/ Nextflow - How to pass the yml yaml format input file from an argument to channel as a list
params.samples="NO_FILE"
workflow {
ch = Channel.fromPath(params.samples).
flatMap(F->{
def yaml = new org.yaml.snakeyaml.Yaml();
def map = yaml.load(F);
return map.samples;
});
doIt(ch)
@lindenb
lindenb / bio-anchor.html
Created August 28, 2023 16:20
A first test with WebComponent, extending HTMLElement javascript bioinformatics
<html>
<head>
</head>
<body>
<bio-anchor build="hg38">rs25</bio-anchor> and
<bio-anchor build="hg38">ENSG00000005108</bio-anchor>
<bio-anchor build="hg38">chr1:1234-1235</bio-anchor>
<bio-anchor build="hg38">xxx</bio-anchor>
</body>