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

Function test_plot_cigar_insertion

src/plot.rs:941–967  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

939
940 #[test]
941 fn test_plot_cigar_insertion() {
942 let cigar_string = CigarStringView::new(
943 CigarString::from(vec![Cigar::Match(2), Cigar::Ins(1), Cigar::Match(2)]),
944 0,
945 );
946 let reference = vec!['A', 'A', 'G', 'C'];
947 let read = vec!['A', 'A', 'A', 'G', 'C'];
948 let cigar = PlotCigar::from_cigar(cigar_string, read, reference).unwrap();
949 let expected_cigar = PlotCigar(vec![
950 InnerPlotCigar {
951 cigar_type: CigarType::Match,
952 bases: None,
953 length: Some(2),
954 },
955 InnerPlotCigar {
956 cigar_type: CigarType::Ins,
957 bases: Some(vec!['A']),
958 length: None,
959 },
960 InnerPlotCigar {
961 cigar_type: CigarType::Match,
962 bases: None,
963 length: Some(2),
964 },
965 ]);
966 assert_eq!(cigar, expected_cigar);
967 }
968
969 #[test]
970 fn test_plot_cigar_deletion() {

Callers

nothing calls this directly

Calls 1

PlotCigarClass · 0.85

Tested by

no test coverage detected