Philip Freda
Ph.D. Candidate investigating the evolution of complex life cycles in holometabolous insects
Ph.D. Candidate investigating the evolution of complex life cycles in holometabolous insects
Communities and Collections
Posts
Post has attachment
Post has attachment
Post has attachment
Post has attachment
Happy Ding Day (Birthday), Matthew Freda! #WorldofWarcraft
Post has attachment
Post has attachment
mmmmm... ice cream
I have a data set with variable amounts of replicates per line (genetic line) in which I am scoring survival (prop_alive). I inserted the following code to produce a subset variable splitting my data by line:

> byline <- split(neg5data\$prop_alive, neg5data\$line)
> bymean <- sapply(byline, mean)
> barplot(bymean, col="blue", ylim=c(0,1), las=3, cex.names=0.7)

With this I produce a beautiful boxplot showing average survival per line. However, I want to add SEM or 95% confidence as an error bar to each bar in the plot.
I would assume if each line had the same amount of replicates it would be easier but this is not the case. Some lines have 4 reps and some 5.
How can I do this quickly? Any help would be appreciated.
yo
Question: I want to sample 12 numbers from 1 to 96 in R 8 times without replacement. I ran the following command in R and got the resulting matrix:
> x1 <- replicate(8,sample(1:96, 12, replace=F))
> x1
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]   28   61   27   56   71   15    9   36
[2,]   53   42   58   16   56   60   39   17
[3,]   66    5   42   45   83   96   10   26
[4,]   33   90   88   33   37    1   48   19
[5,]   26   13   76   48   14   58    5   11
[6,]   36   18   31   24   59   92   74   79
[7,]   25   46   24    4   16   31   92    8
[8,]   20   88   35   42   66   29   63   95
[9,]   70   21   33   72   55    9   72   14
[10,]   73   74   81    7   86   32   17   12
[11,]   32   96   26   11   44   81    3   45
[12,]   57   15    5   57   18   35   80    4

The issue is, the program does indeed sample without replacement but does so each replication from a fresh range of 96. I was wondering how I could do this while pulling a 12 randomly from the 96 but not having replacement over all replicates.  In other words, no numbers repeating at all in the matrix. Any help would be appreciated.

Phil
I have been working with a QTL dataset for quite some time and keep stumbling over an issue. Out of the 1000 or so markers I have, a number of them have the same location value (in cM) as other markers.

In other words:

marker x: 10.05 cM

marker y: 10.05 cM

marker z: 10.05 cM

First, I removed all of the markers that had some type of overlap associated, leaving only one that was associated with some physical gene or bp location. This limited my dataset to approximately 215 markers, a far cry from my original 1000.

I got the results and then tried it again with the original 1000 markers. I am using QTL Cartographer (Unix) v. 1.17 for the analysis. Interestingly, during the analysis in both LRmapqtl and SRmapqtl, I noticed strange output within the terminal like "cond.denom=0" over and over again. I am guessing this is occurring because the recombinational distances between some markers is 0 and therefore are being excluded. However, the output from the 1000 marker analysis yielded more QTL with higher resolution with peaks being in the same general locations as the 215 marker analysis (some just became significant in the 1000 marker analysis)

Should I remove the markers and stick with the ~215 that do not overlap?

Will my data be erroneous if I leave the other ~800 or so markers in?

Any help would be appreciated.