v0.2.2
What's Changed
- try and add youtube video to docs by @zktuong in #148
- testing_rpy2_update by @zktuong in #150
- Speed upgrade - Refactor generate network by @zktuong in #152
- remove nxviz from requirements by @zktuong in #157
Bug fixes and Improvements
- Speed up
generate_network
- pair-wise hamming distance is calculated on per clone/clonotype only if more than 1 cell is assigned to a clone/clonotype
.distance
slot is removed and is now directly stored/converted from the.graph
slot.- new options:
compute_layout: bool = True
. If dataset is too large,generate_layout
can be switched toFalse
in which case only thenetworkx
graph is returned. The data can still be visualised later withscirpy's
plotting method (see below).layout_method: Literal['sfdp', 'mod_fr'] = 'sfdp'
. New default uses the ultra-fast C++ implementedsfdp_layout
algorithm ingraph-tools
to generate final layout.sfdp
stands for Scalable Force Directed Placement.- Minor caveat is that the repulsion is not as good - when there's a lot of singleton nodes, they don't separate well unless you some how work out which of the parameters in sfdp_layout to tweak will produce an effective separate. changing
gamma
alone doesn't really seem to do much. - The original layout can still be generated by specifying
layout_method = 'mod_fr'
. Requires a separate installation ofgraph-tool
via conda (not managed by pip) as it has several C++ dependencies. - pytest on macos may also stall because of a different backend being called - this is solved by changing tests that calls
generate_network
to run last.
- Minor caveat is that the repulsion is not as good - when there's a lot of singleton nodes, they don't separate well unless you some how work out which of the parameters in sfdp_layout to tweak will produce an effective separate. changing
- added steps to reduce memory hogging.
min_size
was doing the opposite previously and this is now fixed. #155
- Speed up
transfer
- Found a faster way to create the connectivity matrix.
- this also now transfer a dictionary that
scirpy
can use to generate the plots scverse/scirpy#286 - Fix #153
- rename
productive
toproductive_status
.
- rename
- Fix #154
- reorder the if-else statements.
- Speed up
filter_contigs
- tree construction is simplified and replaced for-loops with dictionary updates.
- Speed up
initialise_metadata
.Dandelion
should now initialise and read faster.- Removed an unnecessary data sanitization step when loading data.
- Now
load_data
will renameumi_count
toduplicate_count
- Speed up
Query
- tree construction is simplified and replaced for-loops with dictionary updates.
- didn't need to use an airr validator as that slows things down.
- data initialised by
Dandelion
will be ordered based on productive first, then followed by umi count (largest to smallest).
Breaking Changes
initialise_metadata/update_metadata/Dandelion
- For-loops to initialise the object has veen vectorized, resulting in a minor speed uprade
- This results in reduction of some columns in the
.metadata
which were probably bloated and not used.vdj_status
andvdj_status_summary
removed and replaced withrearrangement_VDJ_status
andrearrange_VJ_status
constant_status
andconstant_summary
removed and replaced withconstant_VDJ_status
andconstant_VJ_status
.productive
andproductive_summary
combined and replaced withproductive_status
.locus_status
andlocus_status_summary
combined and replaced withlocus_status
.isotype_summary
replaced withisotype_status
.
- where there was previously
unassigned
or''
has been changed to :str:None
in.metadata
.- Not changed to
NoneType
as there's quite a bit of text processing internally that gets messed up if swapped. No_contig
will still be populated after transfer toAnnData
to reflect cells with no TCR/BCR info.
- Not changed to
- deprecate use of nxviz<0.7.4
- reworked code to use the updated version at https://github.com/zktuong/nxviz/tree/custom_color_mapping_circos_nodes_and_edges
Minor changes
- Rename and deprecate
read_h5/write_h5
. Use ofread_h5ddl/write_h5ddl
will be enforced in the next update.
Full Changelog: v0.2.1...v0.2.2