Skip to content

Commit

Permalink
Update flytable.R
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbates committed Dec 31, 2023
1 parent a54030d commit 94532ef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions R/flytable.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
##### Flywire-Hemibrain matches

# hidden
flytable_meta <- function(){
ft <- fafbseg::flytable_query("select _id, root_id, root_630, root_720, supervoxel_id, proofread, status, pos_x, pos_y, pos_z, nucleus_id, soma_x, soma_y, soma_z, side, ito_lee_hemilineage, hartenstein_hemilineage, top_nt, flow, super_class, cell_class, cell_type, hemibrain_type, cb_type, 0root_duplicated, known_nt from info")
flytable_meta <- function(optic=FALSE){
ft <- fafbseg::flytable_query("select _id, root_id, root_630, root_783, supervoxel_id, proofread, status, pos_x, pos_y, pos_z, nucleus_id, soma_x, soma_y, soma_z, side, ito_lee_hemilineage, hartenstein_hemilineage, top_nt, flow, super_class, cell_class, cell_type, hemibrain_type, cb_type, root_duplicated, known_nt from info")
if(optic){
ft.optic <- fafbseg::flytable_query('select * from optic')
ft.optic <- ft.optic[,intersect(colnames(ft.optic),colnames(ft))]
ft.optic <- ft.optic[!ft.optic$root_id%in%ft$root_id,]
ft.all <- plyr::rbind.fill(ft,ft.optic)
ft <- ft.all %>%
dplyr::filter(!duplicated(root_id))
}
ft$flywire_xyz <- apply(ft[,c("pos_x", "pos_y", "pos_z")], 1, paste_coords)
ft <- as.data.frame(ft)
ft
Expand Down

0 comments on commit 94532ef

Please sign in to comment.