sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
df0551062c643bec04d3e0e1346010249657545ae52e9cdb60f91368b308d5a8 | R | 10,517 | 281 | ---
title: "Differential expression analysis"
subtitle: "Schizophrenia + Bipolar x CT"
author: |
| Katia de Paiva Lopes
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
... |
1192d99a3b06402ea436eb9d7c80a2d4be1cc90addc0a6dcfca4ea45cf8ee34d | R | 10,574 | 370 | ---
title: "Covert Art"
authors: |
|
| Brian M. Schilder
|
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_folding: hide
toc: true
toc_float: true
... |
40ae62a87a8df1607bf2fd1f5caef79f6d26752ecb21aea2937d377fdcc6bc78 | R | 10,600 | 296 | # #' Plot BayesfMRI.spde objects
# #'
# #' @param object Object of class BayesfMRI.spde (see \code{help(make_spde_vol)})
# #' @param colors (Optional) Vector of colors to represent each region.
# #' @param alpha Transparency level.
# #'
# #' @return
# #' @export
# #' @importFrom geometry tetramesh
# #' @import rgl
# #'... |
123a00fe0460188365462a264413cce617e29bde1fcc6e30ad774e394b21cd51 | R | 10,894 | 104 | ###Code to create STRUCTURE plots, calculate admixture proportions and to plot PCA results
library(ggplot2)
setwd("/path/to/directory")
###plots for multiple K values
###STRUCTURE plots: Takes CLUMPP output files that have been reorganized so that assigned populations correspond between different K values. I.e. POP2 ... |
97e291e4695f50ab68efbdcbbdeaa826b43b9950d32f7a8f5447e1d120a1f6b3 | R | 10,951 | 312 | ---
title: "Exploratory plots"
subtitle: "PCAs"
author: |
| Katia de Paiva Lopes
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_folding: hide
toc: true
t... |
fd088559df13c4febe2b2757bd0e764048b383c2b961f1fddd0ebd39b4c03ef4 | R | 11,575 | 256 | ---
title: "Looking at covariates"
subtitle: ""
author: |
| Katia de Paiva Lopes
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_folding: show
toc: true
t... |
3a3899f8eafd1ddba2dcf4db8944632692386351d458e262e1ff34d762896aa8 | R | 11,709 | 224 | ##################################################
## Project: CogNonCog 2018
## Script purpose: Combine the Cog and NonCog results from stratified LDSC together and with the description of the annotations
## Create a scatterplot plotting zscore or enrichment of Cog against NonCog
## Date: November 2018
## Autho... |
da0348495c69725e8607a5bec17a58e31d54125367fc06327a891272db029afb | R | 11,913 | 346 | #' Apply function over locations in each parcel
#'
#' Apply a function across all locations in each parcel, for a pair of data and
#' parcellation \code{"xifti"} objects that are in registration with one
#' another. By default, the mean value in each parcel is calculated.
#'
#' @param xii The \code{"xifti"} data to a... |
dd5d63c766bdca109968f7e2af0889599b07700ff673c235f15fead43d605fb7 | R | 12,009 | 496 | ---
params:
df: "DataFrame"
study: "StudyInfo"
wd: "working_dir"
pattern_to_remove: "pattern"
title: "`r params$study`"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(rjson)
library(DT)
library(plotly)... |
3360086e296d9d0fd265c781c0101f17a9c4b355855b75dbe08490e0e7964abb | R | 12,123 | 344 | d1 = read.delim("AllData_cleaned/Or67d_wTSALE_reduced.txt", header=T, as.is=T, check.names = FALSE)
d2 = read.delim("AllData_cleaned/Or85d_wTSALE_reduced.txt", header=T, as.is=T, check.names = FALSE)
d3 = read.delim("AllData_cleaned/Or67d-Or85d_wTSALE_reduced.txt", header=T, as.is=T, check.names = FALSE)
#############... |
07bcf081c8bda2707616f63cdf485bd9c47227286148ee386e3c614966e45b49 | R | 12,304 | 213 | ---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# ciftiTools <img src="man/figures/logo.png" align="right" height="139" alt="ciftiTools sticker" />
<!-- badges: start -->
[](https://cran.r-project.or... |
e7ebebe167a3d4007608d46e700cfbc56b5ff237add76cb365622784adb43e2a | R | 12,663 | 311 | #' Smooth CIFTI data
#'
#' Spatially smooth the metric data of a CIFTI file or \code{"xifti"} object.
#'
#' If the CIFTI is a ".dlabel" file (intent 3007), then it will be converted
#' to a ".dscalar" file because the values will no longer be integer indices.
#' Unless the label values were ordinal, this is probably ... |
8e34e8bc6ba86a0628528c3cc0fb45845be8835b49ed66914bdad092ad62595a | R | 12,779 | 360 | #' Make replicates
#'
#' beta and repl vectors are of length \eqn{nMesh \times nSess \times n_field}.
#' The ith repl vector is an indicator vector for the cells corresponding to the ith column of x.
#' The ith beta vector contains data indices (e.g. 1,...,V) in the cells corresponding to the ith column of x.
#'
#' @... |
c58b61b040ce18038f388ce656fcfbf376c0fef48b434eb2e6d5230873777486 | R | 12,906 | 367 | #' Is a valid design?
#'
#' @param design The design matrix/array
#' @keywords internal
BayesGLM_is_valid_one_design <- function(design) {
stopifnot(is_matrix_or_df(design) || length(dim(design))==3)
stopifnot(all(apply(design, 2, function(q){all(is.na(q)) || is.numeric(q)})))
stopifnot(all(dim(design) > 0))
TR... |
4ce2c4ae5c1ed5415ffb800c36ccd6aeca9ac6af388a99a1a02c195042d6c22c | R | 13,022 | 440 | #' Summarize a \code{"xifti"} object
#'
#' Summary method for class \code{"xifti"}
#'
#' @param object Object of class \code{"xifti"}.
#' @param ... further arguments passed to or from other methods.
#' @export
#' @method summary xifti
summary.xifti <- function(object, ...) {
x <- list(
measurements = ncol(objec... |
4a3f8d50db4bd67b7d5417d2afa9c6fc1694f71aaafc52234b5a8f7721686efa | R | 13,141 | 324 | ---
title: "Post mashR pipeline"
subtitle: "Brain regions"
author: |
| Katia de Paiva Lopes
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_folding: hide
toc... |
0e53f0292786b910a8e6a4cb90213dffba4879e01d6e4a6aa3cab39d946dd95d | R | 13,335 | 362 | #' Resample a GIFTI file (with its ROI)
#'
#' Perform spatial resampling of GIFTI data on the cortical surface (metric
#' and label), or of GIFTI surface geometry data itself.
#'
#' @param original_fname The GIFTI file to resample.
#' @param target_fname Where to save the resampled file.
#' @param hemisphere \code{"le... |
e929f1f78bbb49bd40afe8d2d18e825be5ec6ca8b1dfc27c11a927665c04c42c | R | 13,754 | 271 | ##################################################
## Project: CogNonCog 2018
## Script purpose: Combine the Cog and NonCog results from MAGMA gene set analysis together and with the description of the annotations
## Save MAGMA results in one txt file
## Create a scatterplot plottin... |
79f910ccc93d8b7ca72200f45ecebcaa55b2c38427228a7990de8de6d5a3d17f | R | 14,202 | 329 | #' Identify Boundary Layers.
#'
#' Identify the vertices within \code{boundary_width} edges of the input mask.
#' The mesh must be triangular.
#'
#' @param faces a V x 3 matrix of integers. Each row defines a face by the index
#' of three vertices.
#' @inheritParams mask_Param_vertices
#' @param boundary_width a pos... |
e957b7cc402bc2e15d3f3d43433a937232d4cf28b3311f981347144691b5bfbe | R | 14,549 | 279 | ### Results and figure when fixing cov(Cog.NonCog) > 0
####################
library(ggplot2)
library(dplyr)
### Merge results with different covariances ###
cov0 <-read.csv("gencor_all_woSNP_cov0.csv", header=T, stringsAsFactors = F)
head(cov0)
cov0$covariance <- 0
cov01 <-read.csv("gencor_all_woSNP_cov... |
49cb535efb8d0c48f4839b380c0a4bf8bf6d43118c79ff585b9e4fe33d684199 | R | 14,715 | 408 | #' Identify field activations
#'
#' Identify areas of activation for each field from the result of \code{BayesGLM}
#' or \code{fit_bayesglm}.
#'
#' @param x Result of \code{BayesGLM} or \code{fit_bayesglm} model
#' call, of class \code{"BGLM"} or \code{"fit_bglm"}.
#' @param Bayes Use spatial Bayesian modeling to ide... |
788c8ad71f31b010cb971f050bb80d0fed0948bd6e7d27f91e3147e89ac7a237 | R | 14,852 | 404 | check_wb <- function() {
if (is.null(ciftiTools.getOption("wb_path"))) {
skip("Connectome Workbench is not available.")
}
}
test_that("Miscellaneous functions are working", {
check_wb()
tdir <- tempdir()
fnames <- ciftiTools.files()
surfL_6k_fname <- file.path(tdir, "L_6k.surf.gii")
resample_gifti... |
8eb9e698ac5869070f626fde669390232ab14b59fb6f4a3ab12e40e7e64c58ee | R | 14,932 | 339 | # Batch Processes
```{r, include = FALSE}
library(kableExtra)
```
## Batch Functions
Select multiple images in the Finder and use the functions under the Batch menu to apply transformations to all of the selected images. The individual processes will be added to the Queue and complete in the background.
<div class... |
52ec70f2b50c0a59f4faf1013c1266a8805c5e669eb4db4df07a03fd1b1c8393 | R | 15,044 | 423 | ---
title: "Fine Mapping COLOC PLAC-Seq"
author: "Jack Humphrey"
date: "23/09/2020"
output:
html_document:
toc: true
toc_depth: 2
toc_float: true
code_folding: hide
dev: 'svg'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(ggbio)
library(GenomicRang... |
e048be842e3908948c30713e42b9ee2caa8c127b5ac1dd20af3158664fdbf716 | R | 15,334 | 374 | #' \code{remap_cifti} wrapper
#'
#' Wrapper for \code{remap_cifti}. Calls \code{resample_cifti_components} using
#' the original file names listed in the \code{original_fnames} argument and
#' the target file names listed in the \code{remap_fnames} argument.
#'
#' @inheritParams original_fnames_Param_remapped
#' @par... |
fa1ffc3a169983bef70878e5616a18bace8cf8e1042843a2390f7f839a54d799 | R | 15,370 | 365 | ##############################
### Supplementary Figure 1 ###
##############################
d = read.csv("Cog_EWAS_BayesR/Cognitive_BayesR_10k_phenotypes.csv")
mean(d$EpiScore)
sd(d$EpiScore)
length(!is.na(d$EpiScore))
smk <- read.csv("../Marioni_Group/GS/GS_dataset/ever_smoke.csv")
smk1 <- merge(d, smk, b... |
b17123821f3f4d6a822de3ea08bc3607b46ea8ea9982ab8f836423afd62ab00e | R | 15,463 | 468 | #' Get title for \code{view_xifti_surface} or \code{view_xifti_volume}
#'
#' Determine the title(s) for the cortical surface or subcortical volume plot,
#' if it was not provided by the user.
#'
#' @param xifti_meta \code{xifti$meta}
#' @param idx The index
#'
#' @return The RGL object ID for the title
#'
#' @keywords... |
dced5f67d1c281334a14fb2875a7be43f588140ba812c1916fc959f5ac855cea | R | 15,549 | 431 | #' Convert \code{"xifti"}
#'
#' Convert the intent of a CIFTI file or \code{"xifti"} object
#'
#' @param x The CIFTI file name or \code{"xifti"} object to convert.
#' @param to The desired intent: \code{"dscalar"} (default), \code{"dtseries"},
#' or \code{"dlabel"}
#' @param cifti_target_fname File name for the conve... |
4e384d2d65c30057e7e38d616cb45642b15fc7d071b199faae6e635a598790a4 | R | 15,785 | 333 | #' Assemble a \code{"xifti"} object
#'
#' Assembles cortical data, subcortical data, and/or surface geometry to form a
#' \code{"xifti"} object. The inputs can be file paths, GIFTI or NIFTI files
#' which have been read in, or data objects (vectors, matrices or arrays,
#' depending on the argument). See \code{as.xif... |
63b940f7a3e940c37f4f598dfc718669cd2f9954bf9b2369707f07743d8fa52c | R | 16,116 | 249 | # Getting Started
## Accounts
### Academic Accounts
If you have an academic email address, you should be able to sign up for a free account and be authorised automatically. If your email isn't automatically recognised as academic, email Lisa and ask to be authorised. You will receive your password in an email (check... |
da5927f32df991edc1923b948b294c1fceb4860ac6c650a341e9cd2795f23533 | R | 16,409 | 440 | #' labels
#'
#' @section Label Levels:
#' \code{xifti$meta$subcort$labels} is a factor with the following levels:
#'
#' \enumerate{
#' \item{Cortex-L}
#' \item{Cortex-R}
#' \item{Accumbens-L}
#' \item{Accumbens-R}
#' \item{Amygdala-L}
#' \item{Amygdala-R}
#' \item{Brain Stem}
#' \item{Caudate-... |
1db440fc70394ff51f6b3f22b71ef454b24bb96ee99167a17c4c069b1007785c | R | 16,784 | 416 | #' Impute \code{"xifti"} data
#'
#' Impute locations using the values of neighboring locations.
#'
#' Cortex vertices will be imputed using the five or six other vertices which
#' share a face. The surface geometry must be present in the \code{"xifti"}.
#'
#' Subcortex voxels will be imputed using the six immediate ne... |
34a49ca6051145aeb248239c1391669ef56ec1f8bce2e2cfda96f6ebaf64770a | R | 16,796 | 917 | #get data used by dimple for all of its examples as a first test
data <- read.delim(
"http://pmsi-alignalytics.github.io/dimple/data/example_data.tsv"
)
#eliminate . to avoid confusion in javascript
colnames(data) <- gsub("[.]","",colnames(data))
#example 1 vt bar
d1 <- dPlot(
x ="Month" ,
y = "UnitSales",
da... |
5b40ebe9a116de51c9b7fe71d5aebc5490d0e68745665fcbd7f4612bdce56ce4 | R | 16,852 | 380 | # News
* (2021-02-25) Manual
There is now a <a href="https://debruine.github.io/webmorph/">manual</a>!
It's very much under construction, but will become more complete with time.
* (2021-02-25) Directory Deletion
You can now delete folders and all
of their contents in one step. Just sele... |
cbdc165b2f35b11e5a78341dbecefccfcc02843f3a0a5a69c3923a75a55eca2d | R | 17,218 | 419 | #' \code{resample_cifti} wrapper
#'
#' Calls \code{resample_cifti_components} using the original file names
#' listed in the \code{original_fnames} argument and the target file names
#' listed in the \code{resamp_fnames} argument.
#'
#' Currently used by read_cifti and resample_cifti.
#'
#' @inheritParams original_fn... |
2cd65800d6f7f837eccba7cd56198066150dc5c8a41d1ae10985214e7875813c | R | 17,617 | 461 | #' Summarize a \code{"surf"} object
#'
#' Summary method for class "surf"
#'
#' @param object Object of class "surf".
#' See \code{\link{is.surf}} and \code{\link{make_surf}}.
#' @param ... further arguments passed to or from other methods.
#'
#' @export
#'
#' @method summary surf
summary.surf <- function(object, ...)... |
c9d86e4fdf0928c702719a5cf865a0901876f339b327526fb897d1f82cf0cf56 | R | 17,619 | 376 | --
title: "Looking at covariates"
subtitle: ""
author: |
| Katia de Paiva Lopes
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_folding: show
toc: true
to... |
c6fafad518766ab33dcac5127bffe05bc344b2098565b9b0472452b2beaaeaa3 | R | 17,883 | 294 | ##################################################
## Project: CogNonCog 2018
## Script purpose: Figure for the genetic correlation data, cog and noncog
## Date: February 2020
# Author: Perline Demange, Adapted from Abdel Abdellaoui's script C:\Users\PDE430\Documents\CogNonCog\Abdel\loneline rG figure
# + Modifi... |
f7c51dead84a0879eb830583df25eea0f58805c571db7479cae23b8d4e82b443 | R | 18,033 | 493 | #' Make the cortical components of a \code{"xifti"}
#'
#' Coerce a path to a GIFTI file, metric or label \code{"gifti"} object,
#' data matrix or vector to a data matrix representing cortical data
#' (and optionally a corresponding mask).
#' That is, entries for \code{xifti$data$cortex_\[left/right\]} and
#' \code{... |
e2ef359da29c1de37971f4b6f9c164bab5fe62f846ef6b51011b5366314e6809 | R | 18,772 | 524 | #' The NIFTI intents supported by \code{ciftiTools}
#'
#' Table of CIFTI file types (NIFTI intents) supported by \code{ciftiTools}.
#'
#' See https://www.nitrc.org/forum/attachment.php?attachid=334&group_id=454&forum_id=1955
#' for information about the different NIFTI intents.
#'
#' @return A \code{data.frame} with e... |
398f90c8f532a244809fad56d3419406b6f79204cc01210716a53ac6e12b4b3e | R | 19,084 | 492 | #' fit_bayesglm
#'
#' Performs spatial Bayesian GLM for task fMRI activation
#'
#' @inheritSection INLA_Description INLA Requirement
#'
#' @param BOLD,design,nuisance Session-length list of numeric matrices/arrays,
#' each with volumes along the first dimension.
#' @param scrub Session-length list of spike regressors:... |
b2423ebd684eb821d0b28b805886cda9f05ea23f2ded900ea77d6a1611c4dd30 | R | 19,342 | 454 | #' \code{separate_cifti} wrapper
#'
#' Calls \code{separate_cifti} using the file names listed in the
#' argument \code{sep_fnames}.
#'
#' Currently used by \code{read_cifti} and \code{resample_cifti}.
#'
#' @inheritParams cifti_fname_Param
#' @inheritParams brainstructures_Param_existing
#' @inheritParams ROI_brainst... |
075b9a2823eefb01ecc4a7de47fa35cf495685f50ca70934dd1ecfab4706cb6a | R | 19,388 | 508 | #' "ROY_BIG_BL" color palette
#'
#' "ROY_BIG_BL", the default palette from the Connectome Workbench.
#'
#' Yields the landmark color hex codes and values for the "ROY_BIG_BL" palette.
#' This is the same color palette as the default Connectome Workbench palette.
#' Source: https://github.com/Washington-University/wor... |
d071066c3170f2e3fe4e2e66c9f807ff45ab85db40fd16949755146c154015f1 | R | 19,593 | 576 | #' Fixed point function for the joint BayesGLM EM update algorithm
#'
#' @param theta a list containing kappa2, phi, and sigma2, in that order
#' @param spde the spde object
#' @param model_data the model_data object containing \code{y} and \code{X}
#' @param Psi a conversion matrix (N by V) (or N by n)
#' @param K num... |
f5b8c4babd03fa80e3020b8a4c477e8508db1c9405340fcd37d92a779731f4bf | R | 19,806 | 492 | #' Generate spatial effects for CIFTI cortical surface data
#'
#' Generate spatial effects over areas for a \code{"xifti"} object with cortical
#' surface data.
#'
#' @param xii a \code{xifti} object
#' @param centers_lambda The number of centers the activations
#' @param smooth_FWHM The full-width half-maximum smooth... |
dca7360c18607b5fcc21db47b95d9b853dbe42fa6d8edc9a3bad1b09759873b2 | R | 21,156 | 456 | # Computes Bayesian GLM posterior means, quantiles and excursions sets (areas of activation) for summaries or contrasts across sessions within a single multi-session model
#
# @param result An object of class BayesGLM0 containing the results of a multi-session analysis. Must contain INLA_result! (See `help(BayesGLM0)`... |
8b9b6ef48a3f386bc85b444143e590fcf98e3ed45a5d7cb81fb3b78ff88d98a8 | R | 21,321 | 479 | #######################################################################################
## Amblypygid Cognition Analysis ##
## 2. Experiment 2 ##
## by - Colton Watts... |
ca60cbd6c059a4a573b439f301783873155b2cb584dc74a86cee691daedd304b | R | 22,880 | 595 | #' Group-level Bayesian GLM
#'
#' Performs group-level Bayesian GLM estimation and inference using the joint
#' approach described in Mejia et al. (2020).
#'
#' @inheritSection INLA_Description INLA Requirement
#'
#' @param results Either (1) a length \eqn{N} list of \code{"BGLM"} objects,
#' or (2) a length \eqn{N} ... |
605f5a7d6d8e5ef19ff1ca3cb284162b0079df3aed70d14e19e17db52f0398c7 | R | 23,125 | 562 | ---
title: "`ciftiTools` Demo"
author: "Damon Pham & Amanda Mejia"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: true
keep_md: true
mathjax: null
vignette: >
%\VignetteIndexEntry{`ciftiTools` Demo}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r include=FALSE}... |
812c20568c56f3161765c0394f354a132c4ffbcde9031f19744589bfe7fda385 | R | 23,259 | 447 | #######################################################################################
## Amblypygid Cognition Analysis ##
## 1. Experiment 1 ##
## by - Colton Watts... |
a2b81caecc0bf35977db4f888a8afb64412515cf18939ea175d2a8e67aaaea5b | R | 23,586 | 565 | ---
title: "Spectral parameterization for studying neurodevelopment: How and why"
subtitle: "Fitting multiple power spectra"
author: "Brendan Ostlund, Thomas Donoghue, Berenice Anaya, Kelley E. Gunther, Sarah L. Karalunas, Bradley Voytek, & Koraly E. Pérez-Edgar"
output: html_document
---
Participating families were a ... |
b80379a32e01a67e4723f3778ca43ae55dd6494821b67901a45b45f058af8179 | R | 23,757 | 667 | #' Validate a numeric matrix
#'
#' Check if object is a numeric matrix.
#'
#' This is a helper function for \code{\link{is.xifti}}.
#'
#' @param x The putative numeric matrix
#'
#' @return Logical. Is \code{x} a valid numeric matrix?
#'
#' @keywords internal
#'
is.nummat <- function(x) {
if (!is.matrix(x) || !is.nume... |
db0ed8b3ce27ad3a1e5c2b596840ba68e678198f6cf8705f965a7a85b0befb08 | R | 24,113 | 497 | ---
title: "Age-related analysis"
subtitle: "Using Dream"
author: |
| Katia de Paiva Lopes
| Ricardo A. Vialle
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: tango
code_... |
926f26f4e137242a8d6ac4e3412b32c255441e944b81646b5622e1f21535f738 | R | 24,611 | 560 | ########################################################
### GS Age demographics for results in the main text ###
########################################################
d <- read.csv("Cognitive_BayesR_10k_phenotypes.csv")
summary(d$age)
sd(d$age)
#############################################################... |
0709e8171eaf9d3eb328021ff4bf41b4af7b2b8639b549f1d9908fb436c7fb54 | R | 24,910 | 690 | #' Find connected indices on mesh
#'
#' @param ind indices
#' @param mesh The inla.mesh
#'
#' @return list of connected components in \code{ind}
#'
#' @keywords internal
find.connected <- function(ind,mesh){
if (!inherits(mesh, "inla.mesh")) {
stop("mesh should be of class inla.mesh")
}
sets <- list()
... |
40363000a24cdf377a75d3dea93db608bc19b0143914afcc735ab250f4ef279c | R | 26,401 | 552 | ---
title: "Spatial Task fMRI Modeling with BayesfMRI"
author: "Mandy Mejia and Damon Pham"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Spatial Task fMRI Modeling with BayesfMRI}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include=FAL... |
b7e124b2862efbfb380d146dfedad454c642257203a419f7f6adbeb229a43b34 | R | 33,958 | 974 | ---
title: "COLOC visualisation"
author: "Jack Humphrey"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_depth: 2
code_folding: hide
dev: 'svg'
---
```{r setup}
knitr::opts_chunk$set(warning = FALSE, echo = FALSE, message = FALSE)
library(tidyverse)
library(ggrepel)
library(patchwork)
`... |
1b30307ba9359a3230c14b973d7d43e33f93db22a560ae84c924d4f6d378590a | R | 34,722 | 864 | #' BayesGLM for CIFTI
#'
#' Performs spatial Bayesian GLM for task fMRI activation with CIFTI-format
#' data. The cortex is modeled as a surface mesh, and subcortical structures
#' are modeled as distinct volumetric regions. Includes the pre-processing
#' steps of nuisance regression, prewhitening, scaling, and vari... |
c66a76362c0c27a4a97bf069687c1f92355f6b9a6274dc4db8b497d7b5fe4dcc | R | 36,724 | 1,013 | ---
title: "BiDirect BIDS Overview"
output:
flexdashboard::flex_dashboard:
vertical_layout: scroll
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(stringr)
library(tidyr)
library(stringi)
library(dplyr)
library(printr)
library(DT)
library(forcats)
library(lubridate)
library(... |
e53ccdc57a372fe8721179e17665e4ff06a673dd9eb092b376d49ac0c2e68aa5 | R | 38,295 | 749 |
# Example meta-analysis cognitive and non-cogntive PGS
# Including forest plots and joy plots
# Big 5 personality variables
# Packages needed
#install.packages("")
#require(metafor)
#require(ggplot2)
#require(ggsci)
#require(tidyverse)
# read in data:
data <- read.csv("",strip.white=TRUE, header = T, na.strings = '... |
5f7b024d0459c0b9b65528f76efde565a46ffa01eeef492397ac358522d26741 | R | 38,423 | 1,061 | ---
title: "COLOC Overlaps"
author: "Jack Humphrey"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_depth: 2
toc_float: true
code_folding: hide
dev: 'svg'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(warning = FALSE, echo = FALSE, message = FALSE)
library(tidyverse)
library(... |
26563c31cd70e9d2eca12109df020db87055448c21bb0ec05c86908542a03613 | R | 40,836 | 1,024 | ---
title: "Spectral parameterization for studying neurodevelopment: How and why"
subtitle: "Illustrative example using the spectral parameterization (specparam) algorithm"
author: "Brendan Ostlund, Thomas Donoghue, Berenice Anaya, Kelley E. Gunther, Sarah L. Karalunas, Bradley Voytek, & Koraly E. Pérez-Edgar"
output: ... |
2383d57375644f263250ccfbf8ba317ebbbb4f3ea0c9392a7bc44b6efc3575f9 | R | 51,351 | 1,266 | #' View subcortical data in a \code{"xifti"}
#'
#' Visualize the subcortical data in a \code{"xifti"} using a series of 2D
#' slices (based on \code{\link[oro.nifti]{overlay}}) or an interactive widget
#' (based on \code{papayar::papaya}). Note: \code{papayar} has been removed
#' from CRAN so the widget is not avail... |
20c518ebca306497206a44321aab61cbf15174267540b8af9a7469921eec7bef | R | 55,008 | 1,079 | ---
title: "Checking GSA results"
subtitle: "Genotypes"
author: |
| Katia de Paiva Lopes
| Ricardo A. Vialle
| Raj Lab
| Department of Neuroscience
| Icahn School of Medicine at Mount Sinai
| NYC, New York
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
theme: united
highlight: ta... |
dd2f048b9ee4f4f66e0b20000ac8be4ac2839cf34a6745e92e970494a27f2530 | R | 64,828 | 1,719 | #' Sort out surface & hemisphere args for \code{view_xifti_surface}
#'
#' See \code{\link{view_xifti_surface}} for details.
#'
#' @inheritParams xifti_Param
#' @param surfL Left surface
#' @param surfR Right surface
#' @param hemisphere Hemisphere
#'
#' @return A list with entries "surfL", "surfR" and "hemisphere"
#'
#... |
fb554a625fd17e4eb7ff20aa04523796a29632c057f97d5f064d31663920e010 | Shell | 24 | 3 | #!/bin/sh
cp "$1" "$2"
|
059a264d10ab5dee38106e25c82b21672a012cd626c5f15f724c54bfc542637d | Shell | 36 | 5 |
awk '{print $NF}' $1 > $1.qvals
|
6458097e8daad8c8fa809ae70436a2ec8019c3e5e409dc7bf51c78d7c93499f8 | Shell | 51 | 3 | #!/usr/bin/env sh
set -eu
python -m pytest -q "$@"
|
af6635441060bf9d6989ecadca5fd96cd1438034f9b7689b47504751c3a1b50a | Shell | 52 | 3 | #!/bin/bash
../../../src/lmp_meso -in cylin_r20.in
|
a0f34cebca8e81de92f576e4d6f1ecfd461ec3c723d520650c3eede5ce27d60c | Shell | 55 | 4 | #!/bin/bash
sqlite3 forge_2.0.db '.read ld_dump.sql'
|
7631866f93bac122e46a1b47de955c5256f657b448dbbfdfe17ca797401e6d8a | Shell | 61 | 1 | poetry run pdoc histoprep -d google --no-show-source -o docs
|
2f395e35db6c5edc4a4ec1e4e6d0d49bff84b5543785de8d767b82c80d9cf5f2 | Shell | 69 | 3 | #!/bin/bash
../../../src/lmp_meso -in double_poiseuille_velocity.in
|
1a48d240d63db0fc56e4d2b80799385981544bf23aef6e9f9e107edfa8a41a48 | Shell | 96 | 3 | #!/usr/bin/env sh
./build/tools/caffe train --solver=examples/mnist/lenet_solver_adam.prototxt
|
3c341441c976dcc604837f0ab4c2b1edd1a47362528638cb1b4982b274ac98a6 | Shell | 99 | 3 | #!/usr/bin/env sh
./build/tools/caffe train --solver=examples/mnist/lenet_solver_rmsprop.prototxt
|
dd79cf43c5ab01a19f9419392818c51697f6fa2140ea7c7efd0f6d84153cf254 | Shell | 108 | 7 | #!/bin/bash
NAME=$(echo $2 | sed -e 's/\.recode.*//g')
grep -vwf <(cut -f1 $1) $2 > $NAME.filtered.vcf
|
558b6a5f83b6c418f26b6268a8a59740de25f7ac3cdafaefea29c413c0f8f2e7 | Shell | 110 | 4 | #!/bin/bash
./build/tools/caffe train \
--solver=examples/mnist/mnist_autoencoder_solver_adadelta.prototxt
|
999a6db30e0017c4fc73c06014c0f0226fccc2696e6369ed8c5fb558057a9b68 | Shell | 123 | 2 | #free -m | head -n2 | tail -1 | awk '{ print $7"Mb ["$7*100/$2"%]" }'
free -h | head -n2 | tail -1 | awk '{print $7"/"$2}'
|
66e1285091f6900c07b12e7e7c091476a474cb4d94f5138587c93f641b72a7bb | Shell | 129 | 7 | #!/usr/bin/env sh
TOOLS=./build/tools
$TOOLS/caffe train \
--solver=examples/cifar10/cifar10_full_sigmoid_solver.prototxt
|
41b219552d03b48ec9367c5f8b4635930fb5cda7f4b79cf569ec9a29caf0e4fe | Shell | 132 | 7 | #!/usr/bin/env sh
TOOLS=./build/tools
$TOOLS/caffe train \
--solver=examples/cifar10/cifar10_full_sigmoid_solver_bn.prototxt
|
66452c41790514e9e1af12636171028a966edd88469ea6dc5f8ffb147ae8a370 | Shell | 154 | 5 | #!/bin/bash
wget https://zenodo.org/record/5573027/files/models.tar.gz # Download model file archive from Zenodo
tar -xzf models.tar.gz
rm models.tar.gz
|
d3c8956e41148117cb716e457cd089c25fe55a74cfd320fca58c4a6e4fe4d372 | Shell | 160 | 11 | #!/bin/bash
#sed -i 's/\..*//g' $1
NAMES=( `cat $1 | cut -f1 | sort | uniq `)
for i in "${NAMES[@]}"
do
grep -A1 $i reference.fasta >> outliers.fasta
done
|
aa233b436bd0008558ec008bf82d3aee4a8ecfcc196b2a6b89ac7230cd7dcbf6 | Shell | 168 | 10 | #!/bin/bash
for f in $(ls *.cpp *.h)
do
echo $f
d=`diff $f /home/ytang/src/LAMMPS-current/src/$f`
if [ -n "$d" ]; then
echo -e "\e[00;31m$d\e[00m"
fi
done
|
95d842c05cbe32f1573e6872a39a8c59526f6ec600c10312370053fcdaa73278 | Shell | 174 | 5 | bgzip $1
tabix -p vcf $1.gz
vcf-annotate --filter c=$2,$3 $1.gz | mawk '!/SnpC/' > $4.vcf
vcf-annotate --filter c=$2,$3 $1.gz | mawk '!/#/' | mawk '/SnpC/' | wc -l
gunzip $1
|
7e8242912a1812858da6fcf11c47e6516e0410107b464870a3d503c2ea0d0813 | Shell | 188 | 13 | #!/bin/bash
#sed -i 's/\..*//g' $1
NAMES=( `mawk '!/#/' $1 | cut -f1 | sort | uniq `)
rm outliers.fasta
for i in "${NAMES[@]}"
do
grep -wA1 $i reference.fasta >> outliers.fasta
done
|
0320b0ff60bc612a5bdf16e880bfef27f347b011ff366d3dc657443ba4b6b4a5 | Shell | 191 | 5 | #!/usr/bin/env sh
./build/tools/caffe train \
--solver=models/bvlc_reference_caffenet/solver.prototxt \
--snapshot=models/bvlc_reference_caffenet/caffenet_train_10000.solverstate.h5
|
5215ad9de2ff52f7ea583c4c500ad4cd0b03388ccc412714534ab25e8085de02 | Shell | 211 | 6 | #!/bin/bash
NAME=$(echo $1 | sed -e 's/\.recode.*//g')
vcfallelicprimitives --keep-info --keep-geno $1 > $NAME.prim.vcf
vcftools --vcf $NAME.prim.vcf --remove-indels --recode --recode-INFO-all --out SNP.$NAME
|
171b2c3d9f21188d7d119e684c755c53e7a0caa24019b89132ce0e4f7a279f07 | Shell | 217 | 8 | #!/bin/bash
motifs=("AAACA" "AAACT" "AGACC" "GAACA" "GAACT" "GGACC" "AAACC" "AGACA" "AGACT" "GAACC" "GGACA" "GGACT")
for motif in ${motifs[@]}
do
python ./train.py -c config.json -i 2_2${motif} --motif ${motif}
done |
4cd224c6bc112985a358951c46c0f0b9b91bd3d4eec4847e94f93d864ef21115 | Shell | 222 | 10 | #!/bin/bash
# Adapted from http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
git stash -q --keep-index
(cd pipeline_test; ./run_test.sh)
RESULT=$?
git stash pop -q
[ $RESULT -ne 0 ] && exit 1
exit 0
|
9bb70b302be023d4c6c54d33533b3241470a0b61a908fef51ff055af2590d3f1 | Shell | 224 | 8 | #!
[operation]
action=archive
[objects]
# find . -type f -iname '*.fast5' -printf "%s %p\n" | awk -v c=2e12 -f ~/bin/split_files_to_subdirs.awk
#/no_backup/enovoa/data/ont/_toRemove/1
/no_backup/enovoa/data/ont/_toRemove/2
|
fbf2068113bd09f6e3313c3d1d06468ff9fbde385a4e68d79f31ba1c2a8863c8 | Shell | 228 | 10 | #!/bin/bash
#inputs = batchnum, n_mig, prefix
random=$(shuf -i 1-10000000 -n 1)
for i in $(eval echo "{0..$2}"); do treemix -i ../$3.gz -m $i -o $3.noboot.m.$i.r.$1 -root TAB -seed $random > $3.r.$1.treemix_${i}_log
done
|
7e4d84c1d73a2135c4d7c9b5e0ae2ae77d9eeca5f28959aa248af777cdbff982 | Shell | 238 | 8 | #!/bin/bash
# Logs (ps aux) to TMP processes with >10% CPU or >10% of RAM usage
# USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
LOG=/hdd/load_dump.log
echo `date` >> $LOG
ps aux | awk '$3>10 || $4>10' >> $LOG
|
ccafc22fd25c609f29adf14693eb3a125cbc29b9b9aa7781fa791ca2e4121d7d | Shell | 240 | 8 | #!/bin/bash
# Make swap
size=64G
path=/tmp/swapfile
# allocate file permissions makeswap enable swap
sudo fallocate -l $size $path && sudo chmod 600 $path && sudo mkswap $path && sudo swapon $path
|
ba83386d06e743e5a4bb779b0284ea9d3fbbd4b7d118cd815fd0e713474bbe43 | Shell | 250 | 11 | #!/usr/bin/env bash
export LC_ALL=en_US.UTF-8
if [ -z "$2" ]; then
echo "Correct usage is sh remove.bad.hap.loci.sh file_with_bad_Loci vcf_file"
exit 1
fi
NAME=$(echo $2 | sed -e 's/\.recode.*//g')
grep -vwf <(cut -f1 $1) $2 > $NAME.filtered.vcf
|
f95bec1359408ef890f95e43dc23b8a56863007f6d2e71c289bd1f0976001790 | Shell | 255 | 10 | #!/bin/bash
echo -e "This script will take a text file with individual names and population names \n and output a file of loci found to be out of HWE within populations"
echo "Proper execution is: sh hwe_filter.sh file_with_names_and_pops p-value"
|
f59ccb45df9ca1f69ed418eda116c109a7d9aa5da2ccd807d86ab33a641e03d2 | Shell | 256 | 8 | #!/bin/bash
#Removes old revisions of snaps
#CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
done
|
43d63d3b1533bc29c4cb9e6f9ac426670e7b6ea7bf3d5758f805416988ca23c8 | Shell | 285 | 8 | #!/bin/bash
vcftools --vcf $1 --depth --out $2
CUTOFF=$(mawk '!/IN/' $2.idepth | cut -f3 | sort -rn | perl -e '$d=.85;@l=<>;print $l[int($d*$#l)]')
mawk -v x=$CUTOFF '$3 < x' $2.idepth | cut -f1 > lowDP.indv
vcftools --vcf $1 --remove lowDP.indv --recode --recode-INFO-all --out $2
|
aaa18ba4bc6ebdaa36ec3733ace55de4775b2faec51adbe908ea6fb7e605d265 | Shell | 293 | 9 | #!/bin/bash
##find flash files
###http://askubuntu.com/questions/289003/where-does-chromium-keep-the-youtube-video-files
ls -l $1/fd/ 2>/dev/null 3>/dev/null| grep -i 'flash' 1>/dev/null 2>/dev/null 3>/dev/null;
if [ $? -eq "0" ];
then
echo $1/fd/;
ls -l $1/fd/ | grep -i 'flash';
fi
|
d3c7cd60ffa5ae0f881abc01b997e2feeb0a7cbb56f4b51726c6b5d2ed20663f | Shell | 306 | 15 | #!/bin/bash
sf=24.4686 # 1pN to 24.4686; unit mapping
epsilonN=10 # 10 particles; So divide by 10
sf=$(echo "$sf/$epsilonN" | bc -l)
for c in {0..200..10}
do
sforce=$(echo "scale=4; ($sf * $c)/1" | bc -l)
mpirun -np 2 ../../../src/lmp_meso -in optical_tweezers.in -var sforce $sforce
done
|
eb63370f6246902b34bbe47fb6cdbf9713e901a37d2a2d7585822600f4af82db | Shell | 316 | 11 | #!/bin/bash
docker run --name=gt_paper_mp2rage_cs \
--tty --interactive \
--net=host \
--privileged \
-v /data/dumpSiemens:/data/dumpSiemens \
-v /usr/local/MATLAB:/usr/local/MATLAB \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
-e DISPLAY \
gadgetronpaper |
0cbd5be7c57b0001d4a00148c23a0a4c23466fa30a4f81e82f3b171cb0cdada2 | Shell | 328 | 11 | #!/usr/bin/env sh
TOOLS=./build/tools
$TOOLS/caffe train \
--solver=examples/cifar10/cifar10_quick_solver.prototxt
# reduce learning rate by factor of 10 after 8 epochs
$TOOLS/caffe train \
--solver=examples/cifar10/cifar10_quick_solver_lr1.prototxt \
--snapshot=examples/cifar10/cifar10_quick_iter_4000.solvers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.