← Về thư mục
tests/bulk-rnaseq/test_scripts.py
- SamplesheetTestCase · class · L52-L67 — class SamplesheetTestCase(unittest.TestCase)
- setUp · method · L53-L57 — def setUp(self) -> None
- write · method · L59-L62 — def write(self, name: str, text: str) -> Path
- validate · method · L64-L67 — def validate(self, text: str, check_files: bool = False)
- SamplesheetShapeTests · class · L70-L102 — class SamplesheetShapeTests(SamplesheetTestCase)
- test_a_well_formed_sheet_passes_cleanly · method · L71-L76 — def test_a_well_formed_sheet_passes_cleanly(self) -> None
- test_a_missing_file_is_an_error_not_a_crash · method · L78-L83 — def test_a_missing_file_is_an_error_not_a_crash(self) -> None
- test_the_required_columns_are_sample_and_fastq_1 · method · L85-L89 — def test_the_required_columns_are_sample_and_fastq_1(self) -> None
- test_whitespace_around_headers_and_values_is_stripped · method · L91-L97 — def test_whitespace_around_headers_and_values_is_stripped(self) -> None
- test_a_missing_strandedness_column_is_only_advisory · method · L99-L102 — def test_a_missing_strandedness_column_is_only_advisory(self) -> None
- SamplesheetContentTests · class · L105-L156 — class SamplesheetContentTests(SamplesheetTestCase)
- test_empty_sample_or_read_cells_are_errors_with_a_row_number · method · L106-L109 — def test_empty_sample_or_read_cells_are_errors_with_a_row_number(self) -> None
- test_the_same_file_in_both_read_columns_is_an_error · method · L111-L114 — def test_the_same_file_in_both_read_columns_is_an_error(self) -> None: # A copy-paste that would silently halve the library.
- test_a_reused_read_one_file_is_an_error · method · L116-L120 — def test_a_reused_read_one_file_is_an_error(self) -> None
- test_unknown_strandedness_values_are_rejected · method · L122-L124 — def test_unknown_strandedness_values_are_rejected(self) -> None
- test_every_documented_strandedness_value_is_accepted · method · L126-L132 — def test_every_documented_strandedness_value_is_accepted(self) -> None
- test_strandedness_is_matched_case_insensitively · method · L134-L136 — def test_strandedness_is_matched_case_insensitively(self) -> None
- test_one_sample_across_lanes_warns_but_does_not_fail · method · L138-L146 — def test_one_sample_across_lanes_warns_but_does_not_fail(self) -> None: # nf-core merges lanes, so this is normal -- it must stay a warning.
- test_mixing_paired_and_single_rows_for_one_sample_is_an_error · method · L148-L156 — def test_mixing_paired_and_single_rows_for_one_sample_is_an_error(self) -> None
- FileExistenceTests · class · L159-L192 — class FileExistenceTests(SamplesheetTestCase)
- test_absent_local_reads_are_errors_when_checking_is_on · method · L160-L162 — def test_absent_local_reads_are_errors_when_checking_is_on(self) -> None
- test_present_local_reads_pass · method · L164-L169 — def test_present_local_reads_pass(self) -> None
- test_an_unusual_extension_on_an_existing_file_is_only_a_warning · method · L171-L177 — def test_an_unusual_extension_on_an_existing_file_is_only_a_warning(self) -> None
- test_remote_urls_are_skipped_rather_than_reported_missing · method · L179-L188 — def test_remote_urls_are_skipped_rather_than_reported_missing(self) -> None
- test_nothing_is_checked_when_file_checking_is_off · method · L190-L192 — def test_nothing_is_checked_when_file_checking_is_off(self) -> None
- MetadataTests · class · L195-L264 — class MetadataTests(SamplesheetTestCase)
- _validate_metadata · method · L196-L204 — def _validate_metadata(self, metadata: str, sheet_text: str = GOOD_SHEET, condition_col: str = "condition", min_rep: int = 3)
- test_a_matching_design_passes_apart_from_the_replicate_advisory · method · L206-L208 — def test_a_matching_design_passes_apart_from_the_replicate_advisory(self) -> None
- test_a_missing_condition_column_names_the_columns_it_found · method · L210-L213 — def test_a_missing_condition_column_names_the_columns_it_found(self) -> None
- test_samples_missing_from_the_metadata_are_an_error · method · L215-L219 — def test_samples_missing_from_the_metadata_are_an_error(self) -> None
- test_extra_metadata_samples_are_only_a_warning · method · L221-L226 — def test_extra_metadata_samples_are_only_a_warning(self) -> None
- test_a_singleton_group_cannot_estimate_variance_and_is_fatal · method · L228-L239 — def test_a_singleton_group_cannot_estimate_variance_and_is_fatal(self) -> None
- test_two_replicates_pass_but_warn_below_the_recommended_minimum · method · L241-L244 — def test_two_replicates_pass_but_warn_below_the_recommended_minimum(self) -> None
- test_an_entirely_empty_condition_column_is_fatal · method · L246-L250 — def test_an_entirely_empty_condition_column_is_fatal(self) -> None
- test_batch_fully_nested_in_condition_is_flagged_as_confounded · method · L252-L260 — def test_batch_fully_nested_in_condition_is_flagged_as_confounded(self) -> None: # Each batch holding a single condition means the batch effect and the # biology cannot be told apart -- the most expensive silent mistake here.
- test_a_crossed_batch_design_is_not_flagged · method · L262-L264 — def test_a_crossed_batch_design_is_not_flagged(self) -> None
- ReportTests · class · L267-L278 — class ReportTests(unittest.TestCase)
- test_errors_fail_the_run_and_warnings_do_not · method · L268-L278 — def test_errors_fail_the_run_and_warnings_do_not(self) -> None
- SampleNameTests · class · L281-L299 — class SampleNameTests(unittest.TestCase)
- test_common_quantifier_suffixes_are_stripped · method · L282-L286 — def test_common_quantifier_suffixes_are_stripped(self) -> None
- test_cleaning_is_idempotent · method · L288-L291 — def test_cleaning_is_idempotent(self) -> None
- test_the_star_strand_columns_match_the_documented_layout · method · L293-L299 — def test_the_star_strand_columns_match_the_documented_layout(self) -> None: # STAR's ReadsPerGene.out.tab puts unstranded/forward/reverse in # columns 1-3; picking the wrong one silently halves the counts.
- CountsMatrixTests · class · L302-L380 — class CountsMatrixTests(unittest.TestCase)
- setUp · method · L303-L306 — def setUp(self) -> None
- _star_table · method · L308-L316 — def _star_table(self, sample: str, rows: str) -> None: # STAR tables sit flat in the directory, named .ReadsPerGene.out.tab.
- test_star_counts_are_assembled_from_per_sample_tables · method · L318-L326 — def test_star_counts_are_assembled_from_per_sample_tables(self) -> None
- test_star_summary_rows_are_excluded_from_the_gene_matrix · method · L328-L333 — def test_star_summary_rows_are_excluded_from_the_gene_matrix(self) -> None: # The first four rows are alignment statistics, not genes; counting # them would inflate the library size for every sample.
- test_genes_absent_from_one_sample_become_zero_not_nan · method · L335-L340 — def test_genes_absent_from_one_sample_become_zero_not_nan(self) -> None
- test_the_strand_choice_selects_a_different_column · method · L342-L347 — def test_the_strand_choice_selects_a_different_column(self) -> None
- test_an_empty_directory_exits_with_a_message · method · L349-L352 — def test_an_empty_directory_exits_with_a_message(self) -> None
- test_featurecounts_output_is_reduced_to_genes_by_samples · method · L354-L368 — def test_featurecounts_output_is_reduced_to_genes_by_samples(self) -> None
- test_outputs_are_written_where_downstream_steps_expect_them · method · L370-L380 — def test_outputs_are_written_where_downstream_steps_expect_them(self) -> None