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

Function test_read_position_with_softclips

src/plot.rs:881–912  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

879
880 #[test]
881 fn test_read_position_with_softclips() {
882 let region = Region {
883 target: "chr6".to_string(),
884 start: 300,
885 end: 500,
886 };
887 let (reads, _reference, _, _, _) = create_plot_data(
888 "tests/sample_2/sample.bam",
889 "tests/sample_2/ref.fa",
890 &region,
891 500,
892 None,
893 0.0,
894 )
895 .unwrap();
896
897 let expected_read = Read {
898 name: "HLA:HLA00318-1144".to_string(),
899 cigar: PlotCigar::from_str("1C|1=|1G|1=|1G|6=|1T|9=|1A|8=|1T|1G|1=|1T|2=|1T|4=|1G|10=|1C|1=|1C|36=|1T|16=|1T|1C|10=|1T|25=|1A|1=|1C|1=").unwrap(),
900 position: 368,
901 flags: 83,
902 mapq: 60,
903 row: Some(
904 9,
905 ),
906 end_position: 887,
907 mpos: 333,
908 aux: AuxRecord(HashMap::new()),
909 raw_cigar: "5S141M4S".to_string(),
910 };
911 assert!(reads[0].values.contains(&expected_read.encode()));
912 }
913
914 #[test]
915 fn test_plot_cigar_match() {

Callers

nothing calls this directly

Calls 2

create_plot_dataFunction · 0.85
AuxRecordClass · 0.85

Tested by

no test coverage detected