MCPcopy Create free account
hub / github.com/alignoth/alignoth / test_read_ordering_with_max_read_depth

Function test_read_ordering_with_max_read_depth

src/plot.rs:810–853  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

808
809 #[test]
810 fn test_read_ordering_with_max_read_depth() {
811 let read1 = Read {
812 name: "read1".to_string(),
813 cigar: PlotCigar(vec![]),
814 position: 20,
815 flags: 0,
816 mapq: 0,
817 row: None,
818 end_position: 120,
819 mpos: 100,
820 aux: AuxRecord(HashMap::new()),
821 raw_cigar: "100M".to_string(),
822 };
823
824 let read2 = Read {
825 name: "read2".to_string(),
826 cigar: PlotCigar(vec![]),
827 position: 40,
828 flags: 0,
829 mapq: 0,
830 row: None,
831 end_position: 140,
832 mpos: 120,
833 aux: AuxRecord(HashMap::new()),
834 raw_cigar: "100M".to_string(),
835 };
836
837 let read3 = Read {
838 name: "read3".to_string(),
839 cigar: PlotCigar(vec![]),
840 position: 50,
841 flags: 0,
842 mapq: 0,
843 row: None,
844 end_position: 150,
845 mpos: 140,
846 aux: AuxRecord(HashMap::new()),
847 raw_cigar: "100M".to_string(),
848 };
849
850 let mut reads = vec![read1, read2, read3];
851 reads.order(2).unwrap();
852 assert_eq!(reads.len(), 2);
853 }
854
855 #[test]
856 fn test_matching_bases() {

Callers

nothing calls this directly

Calls 3

PlotCigarClass · 0.85
AuxRecordClass · 0.85
orderMethod · 0.80

Tested by

no test coverage detected