I just needed to come up with a name for my blog, so as most of the times, when I'm working in the lab I got some help from my favourite programming language, R. See if you could find a better name with playing a round with the seedNumber, and nameSize parameters. You might find another unique name that no one have ever herd before, such as gattaca. OK, maybe this wouldn't be a unique name to choose after all !

Open  R programming language environment

type


dnaSeqRandGenerator<- function(seedNumber=NULL, nameSize=4){
    DNAseqs<- c("A","C","G","T")
    set.seed(seedNumber)

    generatedName<- 
        paste(sample(DNAseqs, nameSize, replace=T), 
            collapse="")    
    return(generatedName)
}


You'll first see the result of my run, i.e. my blogs name. Try running the function dnaSeqRandGenerator with other parameters.
 
RNGkind(sample.kind="Rounding")

dnaSeqRandGenerator(seedNumber=13, nameSize=7)
#[1] "GACATAG" 
 
RNGkind(sample.kind="default") 

Update!
The earlier codes (i.e. green codes above) no longer produces "GACATAG" as there were some changes made to the way that sample() function works in R 3.6.0 . To be able to reproduce, we will need to change the random number generator to the old way by adding RNGkind(sample.kind="Rounding") command. You can reset the random numbr generator to the current default by using RNGkind(sample.kind="default") .

(Last updated on 2nd, Jan, 2023)
0

Add a comment

In this post I show how groupScatterPlot(), function of the rnatoolbox R package can be used for plotting the individual values in several groups toge

In this post I show how classifySex(), function of the rnatoolbox R package can be used for inferring the sex of  the studied subjects from their bina

2
Recently I have started to organize my commonly used functions related to quality assessment and analyzing RNAseq data into an R package.

Many times, in our projects, we may need to compare different measured factors in our samples to one another, and study whether they are linearly depe

2
Many times, in our projects, we may need to compare different measured factors in our samples to one another, and study whether they are linearly depe
Many times, in our projects, we may need to compare different measured factors in our samples to one another, and study whether they are linearly depe
Many times, in our projects, we may need to compare different measured factors in our samples to one another, and study whether they are linearly depe
Occasionally when indexing data frames the format is converted, leading to confusing consequences.

Example of a fastq file in read 1 (in paired read sequencing) is as follows:

@SRR3117565.1.1 1 length=100

NCAAAACAGCTCTCCCTCCTTTGATCTGATGGTCTGCAGAGG

Yesterday (on the opening day of the new Batman movie) I search the Internet for the Batman formula and it's implementations in R.

Yesterday (on the opening day of the new Batman movie) I search the Internet for the Batman formula and it's implementations in R.
Labels
Blog Archive
About Me
About Me
My Photo
I am a Postdoc researcher at the Neuromuscular Disorders Research lab and Genetic Determinants of Osteoporosis Research lab, in University of Helsinki and Folkhälsan RC. I specialize in Bioinformatics. I am interested in Machine learning and multi-omics data analysis. My go-to programming language is R.
My Blog List
My Blog List
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.