Commit cd3ac7a8 authored by Uladzislava KHAURATOVICH's avatar Uladzislava KHAURATOVICH 💬
Browse files

Update second_raremale_heterozygosity.Rmd

parent 0ad33c81
......@@ -22,7 +22,6 @@ invisible(lapply(Packages, library, character.only = TRUE))
rm(list=ls())
```
### Julian's part
## Import Data
#It s just one file - we do not need the file name
......@@ -58,9 +57,6 @@ Sdata <- Sdata1 %>%
Sdata <- Sdata[-(2418541:2840638)]
```
### Saren's part
### Alternatively, without binning
```{r }
# Custom function by Saren
interpret = function(female, male){
......@@ -95,23 +91,3 @@ ggplot(data1 %>% filter(!is.na(Chromosome)), aes(x = Chromosome, fill = state))
#ggplot(data1, aes(x = Chromosome, fill = state)) + geom_bar() # with NAs
```
### get sites with the lost heterozygosity Chr6
```{r}
LossOfHet_positions_LG6 <- data2 %>%
dplyr::filter(Chromosome == "LG6") %>%
dplyr::filter(state == "LossOfHet") %>%
droplevels()
#write.table(LossOfHet_positions_LG6, file = "LossOfHet_positions_LG6.txt", sep = " ", col.names = TRUE, row.names = FALSE, na = "NA")
write.csv(LossOfHet_positions_LG6, file = "LossOfHet_positions_LG6.csv", col.names = TRUE, row.names = FALSE, na = "NA")
```
### get all sites with the lost heterozygosity
```{r}
LossOfHet_all_positions <- data2 %>%
dplyr::filter(state == "LossOfHet") %>%
droplevels()
write.csv(LossOfHet_positions_LG6, file = "LossOfHet_all_positions.csv", col.names = TRUE, row.names = FALSE, na = "NA")
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment