Skip to contents

Given a network with edge scores, subset_network sorts the network in descending order of score and creates subsets using the top given numbers of edges. The size of the subsets can either be determined by the total number of edges (if 'num_possible_TFs' is not specified) or by the desired average number of target nodes from each possible source node (if 'num_possible_TFs' is set to a number > 0). The latter option multiplies each element of 'edges' by 'num_possible_TFs' to get the number of edges in each subset.

Usage

subset_network(input_file, output_directory, name, edges, num_possible_TFs = 0)

Arguments

input_file

a file containing the network to create subsets from. The file should be tab-separated with three columns: source node, target node, edge score

output_directory

name of the folder in which to place the created network subset files

name

base name for the created network subset files

edges

list of total numbers of edges or average edges per TF to include in each subset

num_possible_TFs

if set to a number > 0, the elements of 'edges' will first be multiplied by this number to get the number of edges for each subset

Details

The input file should be tab-separated with three columns: source node (e.g. transcription factor), target node (e.g. the regulated gene), and edge score. The output files will be tab-separated with two columns: source node, target node.