This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 3.8.10 (default, Mar 13 2023, 10:26:41) | |
Type 'copyright', 'credits' or 'license' for more information | |
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help. | |
In [1]: from rpy2.robjects.packages import importr | |
In [2]: reticulate = importr('reticulate') | |
WARNING: The R package "reticulate" only fixed recently | |
an issue that caused a segfault when used with rpy2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import multiprocessing as mp | |
import uuid | |
import rpy2.rinterface as ri | |
import rpy2.rinterface_lib.embedded | |
R_ID_TAG = '_rpy2_R_id_' | |
def print_setup(args): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo | |
echo '---------------' | |
echo ' test w/ FASTA ' | |
echo '---------------' | |
testchrom=chr1.fa.gz | |
if [ ! -f "${testchrom}" ]; then |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
power <- function(x, n) { | |
# a not-so-useful reimplementation | |
x ^ n | |
} | |
square <- function(x) { | |
x^2 | |
} | |
cube <- function(x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a setup snippet for an ipython notebook. | |
# It requires the presence of variable 'setup_digest', | |
# defined in the cell controlling the setup. | |
if 'setup_digest' not in locals(): | |
import rpy2 | |
%load_ext rpy2.ipython | |
# pigheaded / slow rpy2 developpers, | |
# customize away: | |
from rpy2.robjects.conversion import ri2py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:cd75955d68d7ca272ff32886ce865002acb49b25f2e1cfba237539e70925eeda" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:e814b7d85c1dc274b3c62ca6849951326dee84fa31b999f9735064f46fb45a7a" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Untitled0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
NewerOlder