outrigger.commandline module¶
-
class
outrigger.commandline.CommandLine(input_options=None)[source]¶ Bases:
objectMethods
do_usage_and_die(str)Cleanly exit if incorrect parameters are given index()psi()validate()
-
class
outrigger.commandline.Index(**kwargs)[source]¶ Bases:
outrigger.commandline.SubcommandAttributes
foldersgtf_folderindex_folderjunction_reads_filenamejunctions_folderoutput_foldersplice_abbrevsgffutils_db gtf_filename sj_out_tab Methods
csv()Create a csv file of compiled splice junctions execute()filter_junctions_on_reads(spliced_reads)get_event_attributes(db, event_df, splice_type)junction_metadata(spliced_reads, csv)Get just the junction info from the concatenated read files make_events_by_traversing_graph(event_maker, db)Search the splice graph for alternative exons make_exon_junction_adjacencies(metadata, db)Get annotated exon_cols next to junctions in data make_graph(junction_exon_triples, db)Create graph database of exon-junction adjacencies make_junction_reads_file()maybe_make_db()Get GFFutils database from file or create from a gtf maybe_make_folder(folder)maybe_overwrite(filename)Ensures that filename is not overwritten unless user-specified write_new_gtf(db)-
make_events_by_traversing_graph(event_maker, db)[source]¶ Search the splice graph for alternative exons
-
make_exon_junction_adjacencies(metadata, db)[source]¶ Get annotated exon_cols next to junctions in data
-
static
make_graph(junction_exon_triples, db)[source]¶ Create graph database of exon-junction adjacencies
-
max_de_novo_exon_length= 100¶
-
splice_abbrevs¶
-
-
class
outrigger.commandline.Psi(**kwargs)[source]¶ Bases:
outrigger.commandline.SubcommandAfterIndexAttributes
foldersgtf_folderindex_folderinput_indexWhere to read the index from junction_reads_filenamejunctions_folderoutput_folderpsi_foldersplice_type_foldersgffutils_db gtf_filename junction_id_col reads_col sample_id_col sj_out_tab Methods
csv()Create a csv file of compiled splice junctions execute()Calculate percent spliced in (psi) of splicing events filter_junctions_on_reads(spliced_reads)junction_metadata(spliced_reads, csv)Get just the junction info from the concatenated read files make_junction_reads_file()maybe_get_validated_events(splice_abbrev)maybe_make_db()Get GFFutils database from file or create from a gtf maybe_make_folder(folder)maybe_overwrite(filename)Ensures that filename is not overwritten unless user-specified maybe_read_junction_reads()validate_junction_reads_data(junction_reads)-
folders¶
-
junction_id_col= None¶
-
psi_folder¶
-
reads_col= None¶
-
required_cols= {'--reads-col': None, '--sample-id-col': None, '--junction-id-col': None}¶
-
sample_id_col= None¶
-
splice_type_folders¶
-
-
class
outrigger.commandline.Subcommand(**kwargs)[source]¶ Bases:
objectAttributes
foldersgtf_folderindex_folderjunction_reads_filenamejunctions_folderoutput_foldergffutils_db gtf_filename sj_out_tab Methods
csv()Create a csv file of compiled splice junctions filter_junctions_on_reads(spliced_reads)junction_metadata(spliced_reads, csv)Get just the junction info from the concatenated read files make_junction_reads_file()maybe_make_db()Get GFFutils database from file or create from a gtf maybe_make_folder(folder)maybe_overwrite(filename)Ensures that filename is not overwritten unless user-specified -
debug= False¶
-
folders¶
-
force= False¶
-
gffutils_db= None¶
-
gtf_filename= None¶
-
gtf_folder¶
-
ignore_multimapping= False¶
-
index_folder¶
-
static
junction_metadata(spliced_reads, csv)[source]¶ Get just the junction info from the concatenated read files
-
junction_reads_filename¶
-
junctions_folder¶
-
maybe_overwrite(filename)[source]¶ Ensures that filename is not overwritten unless user-specified
- If the file doesn’t exist, return “True”, as in “yes, please overwrite” even though there wasn’t really a file there, but the action is still to create the file in the next step
- If the file exists and the user specified nothing, exit the program and complain that either –force or –resume must be specified
- If the file exists and the user specified –force, then return True
- If the file exists and the user specified –resume, then return False so that the file is not overwritten
Parameters: filename : str
Path to a file that you may want to overwrite
Returns: if_overwrite : bool
If True, then the next step in the program has the go-ahead to “overwrite” or create the file. If False, the file exists and the user doesn’t want to overwrite it
-
min_reads= 10¶
-
output_folder¶
-
reads_col= 'reads'¶
-
resume= False¶
-
sj_out_tab= None¶
-
-
class
outrigger.commandline.SubcommandAfterIndex(**kwargs)[source]¶ Bases:
outrigger.commandline.SubcommandCan use different index folder than outrigger_output/index
Attributes
foldersgtf_folderindex_folderinput_indexWhere to read the index from junction_reads_filenamejunctions_folderoutput_foldergffutils_db gtf_filename sj_out_tab Methods
csv()Create a csv file of compiled splice junctions filter_junctions_on_reads(spliced_reads)junction_metadata(spliced_reads, csv)Get just the junction info from the concatenated read files make_junction_reads_file()maybe_make_db()Get GFFutils database from file or create from a gtf maybe_make_folder(folder)maybe_overwrite(filename)Ensures that filename is not overwritten unless user-specified -
folders¶
-
input_index¶ Where to read the index from
-
-
exception
outrigger.commandline.Usage(msg)[source]¶ Bases:
ExceptionUsed to signal a Usage error, evoking a usage statement and eventual exit when raised
-
class
outrigger.commandline.Validate(**kwargs)[source]¶ Bases:
outrigger.commandline.SubcommandAfterIndexAttributes
foldersgtf_folderindex_folderinput_indexWhere to read the index from junction_reads_filenamejunctions_folderoutput_foldergffutils_db gtf_filename sj_out_tab Methods
csv()Create a csv file of compiled splice junctions execute()exon_pair_splice_sites(exonA, exonB, ...)filter_junctions_on_reads(spliced_reads)individual_exon_splice_sites(exon, ...)junction_metadata(spliced_reads, csv)Get just the junction info from the concatenated read files make_junction_reads_file()maybe_make_db()Get GFFutils database from file or create from a gtf maybe_make_folder(folder)maybe_overwrite(filename)Ensures that filename is not overwritten unless user-specified