Displaying 5 results from an estimated 5 matches for "locus3".
Did you mean:
locus
2018 Mar 15
3
stats 'dist' euclidean distance calculation
...lculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated:
3x3 subset used
Locus1 Locus2 Locus3
Samp1 GG <NA> GG
Samp2 AG CA GA
Samp3 AG CA GG
The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2))
My assumption was that the difference between x_i and y_i wou...
2011 Feb 17
4
Find and replace all the elements in a data frame
Hi all,
I'm having a problem once again, trying to do something very simple. Consider
the following data frame:
x <- read.table(textConnection("locus1 locus2 locus3
A T C
A T NA
T C C
A T G"), header = TRUE)
closeAllConnections()
I am trying to make a new data frame, replacing "A" with "A/A", "T" with "T/T",
"G" with "G/G", and "C" with "C/C." Note also the presence of an &q...
2009 Jan 19
1
Deleting columns where the frequency of values are too disparate
...; or "Locus2", ... or "Locus6"), the individuals have either one allele (from the set of A,T,C,G) or one other allele (from the set of A,T,C, G). For example, at Locus1 individuals have have either the A or T allele only; at Locus2 the individuals can have either C or G only; at Locus3 the individuals can have either T or G only.
IDLocus1Locus2Locus3Locus4Locus5Locus6
1AGTAAC
2AGGACC
3ACGGCC
4ACGGCC
5AGGGAC
6TGGGCC
7TCGGCC
8TCGGAC
9TGGGCC
10TCGGCC
11AGGGAC
12ACGGCC
13AGGGCC
14AGGGAC
15ACGGCC
16TCGGCC
17TGGGAC
18TGGGCC
19TGGGCC
20TCGGAC
I want to delete any columns from the data...
2018 Mar 15
0
stats 'dist' euclidean distance calculation
> 3x3 subset used
> Locus1 Locus2 Locus3
> Samp1 GG <NA> GG
> Samp2 AG CA GA
> Samp3 AG CA GG
>
> The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2)) My
> assumption was that the diff...
2007 Sep 27
2
create data frame(s) from a list with different numbers of rows
...1:2], List.elements[,.row])
})
#Locus2
L2.pairwise.columns <- matrix(5:ncol(List.elements), byrow=TRUE, ncol=2)
Loc2.gamete.counts<- apply(L2.pairwise.columns , 1, function(.row){
paste(List.elements[,3:4], List.elements[,.row])
})
#Locus3
L3.pairwise.columns <- matrix(7:ncol(List.elements), byrow=TRUE, ncol=2)
Loc3.gamete.counts<- apply(L3.pairwise.columns , 1, function(.row){
paste(List.elements[,5:6], List.elements[,.row])
})
##Creation of the List
Gamete.pairs<-cbind(Loc1.gamete...