Error in .Call2("new_input_ExternalFilePtr", fp, PACKAGE = "Biostrings") : cannot open file 'hairpin.fa'
I am new to R and want to analyze miRNA data set of 3 groups. I am able to normalize, designing matrix and contrast matrix and differential expression. But what I am facing is affy chip has lot of other miRNA probes which I guess I am not able to filter them out. I just want to select human miRNAs from chip and do analysis and compare the three groups. Can any one help me in this
4 answers
If I understood correctly, you want to filter them out-> just the human miRNAs. You can use grep for that Here is an example (loads a fasta file containing the hairpins annotated in miRBase and filters the human ones)
library("Biostrings")
aux <- read.RNAStringSet("hairpin.fa")
names(aux)
grep("hsa",names(aux))
aux[grep("hsa",names(aux))]
You can adapt it for your task. Hope this helps.
Did not work! What should I do....
@Shafi- you cannot open the file since it is not saved locally on your computer. I do not have access to your code so I gave you an example on how to extract rows from a data object containing a specific substring, in this case, "hsa" the default start string for the miRNAs annotated in mirBase
Hi
I just want to study differential expression of human miRNAs and compare 3 gruops. I have used affy chips (mirna20). Just 2 weeks before I started learning R. Dont know much. During these days I learned how to load, read, normalize(RMA) data. I will appreciate if some one will help me out or direct me towards relevant example. Thanks in advance
Hello Agatha
would the same example code work with biopython? i have also a hairpin.fa file from miRbase and am only interested in the hsa-mir-*** miRNAs. how can i extract them with the id,and sequences?
Hi
I am also new to R. I used following script to grep only human miRNAs.
# grep("hsa", featureNames(eset))->hsa
# eset.hsa<-eset[hsa,]
Hope it will work for you
Log in to answer this question.
Shari, it would help to mention which Affy chip you are using. If they are annotated using miRBase annotations, then the human miRNA names should all start with "hsa"
its mirrna20 from affymetrix
topTable(fit2, coef=1, adjust="fdr", sort.by="B", number=20) ID logFC AveExpr t P.Value adj.P.Val B 20398 zma-miR156e_st 0.3198252 0.4998068 4.487144 3.782516e-05 0.6469183 0.62186254 18047 pvu-miR482-star_st -0.2559547 0.5195567 -4.233259 8.925328e-05 0.6469183 0.09110598 2995 ame-miR-316_st -0.3233149 0.4537794 -4.029978 1.748058e-04 0.6469183 -0.32656880 12019 hsa-miR-3119_st -0.3040332 0.4469291 -4.016812 1.824927e-04 0.6469183 -0.35336278 2088 ENSG00000252228_x_st -0.3748713 0.6650043 -3.990783 1.986619e-04 0.6
you can not only has but others are dominant
you can see not only has but other species are dominant in topTAble
you can see not only has but other species are dominant in topTAble
ExpressionSet (storageMode: lockedEnvironment) assayData: 20706 features, 55 samples element names: exprs protocolData sampleNames: EC1_(miRNA).CEL EC21_(miRNA).CEL ... YC85_(miRNA).CEL (55 total) varLabels: ScanDate varMetadata: labelDescription phenoData sampleNames: EC1_(miRNA).CEL EC21_(miRNA).CEL ... YC85_(miRNA).CEL (55 total) varLabels: sample varMetadata: labelDescription featureData: none experimentData: use 'experimentData(object)' Annotation: mirna20
Shafi, looks like you have "hsa" miRNAs. So filter out all miRNAs whose names don't start with hsa. Then count the number of miRNAs left -- if it's less than 300, you probably overfiltered and if its more than about 1500, you haven't filtered enough.
yes that is what I want to do. Can you help me how I can select only has miRNAs? I appreciate you kind help
yes that is what I want to do. Can you help me how I can select only has miRNAs? I appreciate you kind help
yes that is what I want to do. Can you help me how I can select only "hsa" miRNAs? I appreciate you kind help