Questions tagged [r]

Please supplement your question with a minimal reproducible example. Use dput() for data and specify all non-base packages with library calls. For statistical questions please use http://stats.stackexchange.com.

135 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
313 views

How can I read multiple different regions from a BAM file in R?

I’m trying to process BAM records (of a coordinate-sorted, indexed BAM file) successively in fixed-size, non-overlapping, sliding genome coordinate windows. Unfortunately I am unable to read records ...
4
votes
1answer
99 views

How to calculate module-trait relationship when trait data is in binary format?

I have a dataset of 50 breast cancer samples. These samples are classified into four subtypes Lum A, Lum B, Her2 and Basal. I have been working with lncRNAs and protein-coding genes. To identify the ...
3
votes
0answers
209 views

Differentially methylated position analysis in a related sample?

I'm trying to figure out how to do a DMP analysis (using minfi dmpFinder) on a related sample (if it's even possible). Right now the code (not written by me) is: ...
3
votes
0answers
111 views

How do I resolve disagreements in the determination of significant genes?

I want to find some good predictors (genes). I have checked the Spearman correlation of the expression of each of 23 genes with dependent variables (responders Vs non-responders and I saw only the 5 ...
3
votes
1answer
165 views

Get genomic coordinates using GenomicFeatures by HGNC gene names

I want to get coordinates of human genes from my list (consisting of hgnc genes id) using GenomicFeatures and TxDb.Hsapiens.UCSC.hg19.knownGene R packages from Bioconductor. ...
3
votes
0answers
238 views

R package equivalent to RSeQC infer_experiment to get strandedness of RNA-Seq

I am currently writing an R package that includes a module to run featureCounts (gene quantification tool) from Rsubread. I wanted to be able to specify the correct strandedness option to ...
3
votes
0answers
136 views

Minfi returning incorrect beta values

UPDATE: I found the solution. I was using normalized values and GEO was using raw beta values. I'm trying to link GEOquery and minfi. Specifically I want to obtain beta values from the idat files ...
2
votes
0answers
19 views

Calculating percent mouse cells per sample

I want to see the correlation between % mouse reads per sample vs % mouse cells per sample. I've already calculated the % mouse reads per sample but I'm stuck on calculating the % of mouse cells per ...
2
votes
0answers
58 views

How to plot a PCOA biplot with OTU loadings as arrows

I'm working on gut microbiota data. I want to perform a biplot showing my 2 enterotypes and the major OTU explaining the variance between my two enterotypes. Something like : from https://doi.org/10....
2
votes
0answers
42 views

Simultaneously get data from multiple applied gates in flowCore

I'm applying two parallel and non-overlapping gates to a gatingSet directly under "root": ...
2
votes
0answers
33 views

What are the best practices for comparing .seg copy number outputs from iChorCNA to VisCapCancer?

I have shallow whole genome sequence data that I used the tool iChorCNA to find the mean copy number segmentation per region. The tool produces a seg file and can be seen here: https://github.com/...
2
votes
0answers
338 views

Annotation label not matching to the color assigned in complex heatmap

The issue im facing is I'm assignig the colour to the annotation label but when it is rendered the label in my metadata does't match with the final output not sure what exactly is the problem. The ...
2
votes
0answers
105 views

How can I collapse probes to single value per gene using GEOquery?

I have extracted microarray gene expression data from GEO using the GEOquery package in R. There are multiple probes per gene. Is there a way to select the best ...
2
votes
1answer
108 views

How to interpret Mendelian randomization results?

I did Mendelian randomization using this software: https://cran.r-project.org/web/packages/MendelianRandomization/vignettes/Vignette_MR.pdf ...
2
votes
0answers
54 views

How can `limma` be used to determine genes predictive of a given phenotype?

Using limma within Bioconductor here, which is a linear model package for microarray data and lmFit on gene expression data, I ...
2
votes
0answers
91 views

group samples based on shared mutations in a single multi samples vcf file

I am learning about vcf file formatting and have a multi-sample (>300) vcf file and aim to group (take) samples with shared mutations. Can someone suggest a tool/command/script solve this problem?
2
votes
0answers
204 views

Ploting FDR along with the pathway as heatmap any simple way

I have this data from one of the cluster which show pathway in context of those genes but when i do a bit of filtering i see plenty of pathways with same or similar FDR which are sort of redundancy i ...
2
votes
0answers
468 views

R package CMD check errors

I have written some codes in R for my personal use. The package successfully installed on my personal laptop (where I have written those commands) and working correctly. But when I distributed it to ...
2
votes
0answers
483 views

corrplot issue with correlation plot output

Very conceptual doubt not sure if im doing it right or something terribly wrong so im using this corrplot library to calucate the correlation of my desired data frame after that i rounding it off but ...
2
votes
0answers
97 views

R package grur: missing_visualization() fails during redundancy analysis of .vcf

I am trying to use the R package grur to process GBS SNP data, which is installed from github as instructed. For starters, I am running the test code in this vignette. As suggested I am running it ...
2
votes
0answers
530 views

SingleCellExperiment: invalid rownames length

I did all of the installations from scratch in a virtual conda environment. Then I tried to run R script from within ...
2
votes
0answers
115 views

How to plot gene mutation frequencey in terms of percnatge alteration in samples?

I'm taking data from cbioportal of gene and their mutation frequency with percentage which I'm trying to categorize with various sub class. The issue I'm facing is I have to plot it in mutation ...
2
votes
0answers
894 views

GO Term heatmap plot in terms of P value or fold enrichment

I'm clustering genes in terms of expression after clustering them. I'm taking out clusters and trying to find out what kind of GO terms are coming up. I came across this figure from this paper, I want ...
2
votes
0answers
97 views

How to extract Genbank sequence and identify ORFs from the sequence in R?

I used ape::read.GenBank and then used the function ORFik::findORFs to find ORFs in the sequence of interest. But the former ...
2
votes
0answers
380 views

Reproducing GTEx transcriptome analysis

I am willing to reproduce part of the analysis from "The human transcriptome across tissues and individuals" (Melé et all, 2015). I downloaded GTEx v6 FPKM data in txt format from GTEx portal. I want ...
2
votes
0answers
396 views

Different results between paired t-test, paired t-test-like (empirical Bayesian), and mixed effect model

I am learning the R package limma using its user guide. I need help on understanding the difference between the paired t-test, paired t-test-like (empirical Bayesian) and the mixed effect model in the ...
2
votes
0answers
127 views

Post ipyrad filtering of SNP loci from GBS, based on SNP quality

I want to use SNPs produced by Ipyrad, which is a python script for RADseq, using maize genome data via RAxML to examine the monophyly of a highly-variable focal species and its phylogenetic ...
2
votes
0answers
439 views

Filter out PCA outliers automatically

I am new to bioinformatics and PCA. What I am trying to do is to remove bad cells from a dataset that was obtained with scRNA-seq for ...
1
vote
0answers
33 views

How to split genotypes into two groups from a SNP txt file contains -1, 0 and 1 in R?

I have a SNP file(it is 96 obs. of 1178 variables with -1, 1 and 0 and in some places NA) and I need to calculate Jaccard genetic distance from them in R. Is there any way to convert these 3 values to ...
1
vote
0answers
34 views

The correct design for time series experiment

I have a treatment and control in two time points like this ...
1
vote
0answers
22 views

NMF - Subscript out of bounds

I've calculated the cophenetic coefficients for the NMF of gene expression data, but is giving error when performing the clustering information step as given below: ...
1
vote
0answers
15 views

Mapping ICD9 codes in UKBB data to PheCodes using PheWAS package

I am working on the UKBB data and trying to specify cases and controls by converting ICD9 codes to PheCodes. I have input data (icdt) where the first column (f.eid) is patient IDs and the remaining ...
1
vote
0answers
61 views

Extract read names and the associated nucleotides on specific positions from a BAM file (in R)

Let's assume I have a BAM file and several positions that I would like to examine more closely in this alignment. My goal is to find out whether these positions are on the same reads and which ...
1
vote
0answers
81 views

Creating new seurat object with new matrix

I'm trying to do a cross-species comparison between the patient TME vs. the PTX TME to understand gene expression conservation. I have already converted between mouse and human genes giving me a ...
1
vote
1answer
52 views

How to run GSEA analysis on R studio using DEG file list generated from scRNAseq analysis

I want to draw the standard plot of GSEA on Rstudio. I have a data frame that consists of a list of DEGs as below. Actually, I put the DEG list directly to PANTHER that resulted in the GO or pathway ...
1
vote
0answers
45 views

3d model of a protein via nucleotide sequence

I really appreciate @Matteo Ferla's detailed answer to my previous question. I've already tested several tools to know if a mutation can cause a modification in the function of protein or not. There ...
1
vote
0answers
40 views

How to create a DESeqDataSet and define experiment design before varianceStabilizingTransformation?

I have an RNAseq count matrix consisting of 2 groups (high, low) with 6 timepoints per group (T1,T2,...,T6) and 3 replicates per timepoint (rep1, rep2, rep3). So a 2-factor design with 36 samples in ...
1
vote
0answers
36 views

Combining dataTracks in Gviz by averaging or subtraction

I would like to average (and maybe also additional operations such as subtraction) 2 or more DataTracks and plot the result using the Gviz (https://bioconductor.org/packages/release/bioc/html/Gviz....
1
vote
0answers
15 views

Bioconductor, genefilter() returns NULL dimensions, is my filtering process wrong?

I'm using R and bioconductor in order to conduct some gene analysis on an Affymetrix dataset (GSE173360) but I'm having trouble at filtering genes. I'm trying to create a dataset called small.eset by ...
1
vote
1answer
69 views

Clustering with Seurat

My data consists of two groups control and stim. I'm concerned that my clustering in the stim group is dominated by the unregulated genes. I can remove these genes and recluster but is there a way to ...
1
vote
0answers
26 views

Data format for pathway based clustering of samples

I came across this paper as one of the examples from this paper, this one Figure 2. Host Protein Alterations in Infected iAT2s ...
1
vote
1answer
38 views

Create a NHX phylogeny format with r or python

I need help to add information in my phylogenetic tree on each branch. I have two pieces of information at my disposal: 1 ) A phylogenetic tree in newick format : <...
1
vote
0answers
28 views

What is the best way to start for analysing DNA methylation TGCA datasets using R? I want to learn but I'm a novice

I am relatively new to programming and only have a basic knowledge base for R. I am keen on learning how to manipulate DNA methylation arrays for analysis related to Glioblastoma Multiforme. More ...
1
vote
0answers
18 views

co-expression analysis for two different tissues of same sample

I have gene expression datasets A and B that contain as many rows as genes and as many columns as samples. The rows in A and B represent a common set of genes measured in different tissues of the same ...
1
vote
0answers
24 views

How to use EPIC DNAm files (.idat) to infer copy number alteration

I have access to EPIC DNA methylation profiles from approximately 40 samples. I want to use these .idat files in order to predict copy number alterations within specific promoter regions of interest. ...
1
vote
0answers
17 views

Questions about EBSeq (in R)

I have made a UMAP of malignant cells and the result is split into 3 clusters, as seen below. For the sake of example, let's say I want to find the differentially expressed genes in the uppermost ...
1
vote
0answers
60 views

Error running GenomicVis vcf.venn(vcf.files, 'GRCh38', sample.names)

I am trying to draw venn diagrams with a GenomicVis package (R). library(GenomicVis) It is loaded with a warning: ...
1
vote
1answer
118 views

Differentially expressed genes analysis in Seurat

For the differentially expressed genes analysis, is it possible to check for DEGs based on the levels already identified in the object? For example, my dataset contains cells from 11 subjects, which ...
1
vote
0answers
57 views

How to implement SEG (Wootton and Federhen ,1993) algorithm?

I want to implement SEG in my MATLAB environment and I'm relying on Wootton and Federhen (1993) Reading the article I cannot succeed to understand what kind of process I have to implement in order to ...
1
vote
0answers
275 views

Kraken2 or metaphlan2 report to phyloseq

I wish to convert a kraken2 or metaphlan2 report into the R package to analyze using Phyloseq. I have performed obtained an importation and Phyloseq analysis, but the result was not correct. ...