Skip to content

Commit

Permalink
fix error in niche calculation code
Browse files Browse the repository at this point in the history
  • Loading branch information
RubD committed Sep 16, 2023
1 parent 34b12a2 commit 885960c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/combine_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,13 @@ calculateSpatCellMetadataProportions = function(gobject,
output = 'data.table')

# merge spatial network and cell metadata
network_annot = data.table::merge.data.table(network, cell_meta[,c('cell_ID', metadata_column), with = FALSE], by.x = 'source', by.y = 'cell_ID')
network_annot = data.table::merge.data.table(x = sp_network,

Check notice

Code scanning / lintr

Use <-, not =, for assignment. Note

Use <-, not =, for assignment.

Check notice

Code scanning / lintr

Trailing whitespace is superfluous. Note

Trailing whitespace is superfluous.
y = cell_meta[,c('cell_ID', metadata_column), with = FALSE],

Check notice

Code scanning / lintr

Commas should always have a space after. Note

Commas should always have a space after.

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. Note

Lines should not be more than 80 characters.

Check notice

Code scanning / lintr

Trailing whitespace is superfluous. Note

Trailing whitespace is superfluous.
by.x = 'source', by.y = 'cell_ID')

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. Note

Lines should not be more than 80 characters.
setnames(network_annot, old = metadata_column, 'source_clus')
network_annot = data.table::merge.data.table(network_annot, cell_meta[,c('cell_ID', metadata_column), with = FALSE], by.x = 'target', by.y = 'cell_ID')
network_annot = data.table::merge.data.table(x = network_annot,

Check notice

Code scanning / lintr

Use <-, not =, for assignment. Note

Use <-, not =, for assignment.

Check notice

Code scanning / lintr

Trailing whitespace is superfluous. Note

Trailing whitespace is superfluous.
y = cell_meta[,c('cell_ID', metadata_column), with = FALSE],

Check notice

Code scanning / lintr

Commas should always have a space after. Note

Commas should always have a space after.

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. Note

Lines should not be more than 80 characters.

Check notice

Code scanning / lintr

Trailing whitespace is superfluous. Note

Trailing whitespace is superfluous.
by.x = 'target', by.y = 'cell_ID')

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Only use double-quotes. Note

Only use double-quotes.

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. Note

Lines should not be more than 80 characters.
setnames(network_annot, old = metadata_column, 'target_clus')

# create self information: source cell is its own neighbor
Expand Down

0 comments on commit 885960c

Please sign in to comment.