Skip to content

Commit

Permalink
long UTR adress idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Sven Geissler committed Nov 6, 2020
1 parent 8433ce3 commit c5ae815
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions ideas/long_UTR.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
source('analysis/00_load.R')
source('scripts/distance_matching.R')

load('data/01_nicolas.rda')
load('analysis/02_merging.rda')


nicolas$upshifts %>%
transmute(id, start = pos, end = pos, strand) %>%
distance_matching(
bind_rows(
select(merging$merged_genes,
id = merged_id,
start, end, strand),
nicolas$all.features %>%
filter(is.na(type) | str_detect(type, "3'")) %>%
mutate(five = ifelse(strand == '+', start, end)) %>%
select(id = locus, start = five, end = five, strand)
)
) %>%
filter(!antisense) -> cmp


cmp %>%
group_by(x) %>%
summarize_at('distance', min) %>%
filter(distance <= 500) %>%
ggplot(aes(distance)) +
geom_histogram()

cmp %>%
filter(distance <= 50) %>%
select(x) %>%
unique -> foo

cmp %>%
anti_join(foo) %>%
select(x) %>%
unique %>%
nrow

0 comments on commit c5ae815

Please sign in to comment.