| 737 | |
| 738 | #[test] |
| 739 | fn test_plot_cigar_string_serialization() { |
| 740 | let plot_cigar = PlotCigar(vec![ |
| 741 | InnerPlotCigar { |
| 742 | cigar_type: Match, |
| 743 | bases: None, |
| 744 | length: Some(50), |
| 745 | }, |
| 746 | InnerPlotCigar { |
| 747 | cigar_type: Del, |
| 748 | bases: None, |
| 749 | length: Some(3), |
| 750 | }, |
| 751 | InnerPlotCigar { |
| 752 | cigar_type: Match, |
| 753 | bases: None, |
| 754 | length: Some(10), |
| 755 | }, |
| 756 | InnerPlotCigar { |
| 757 | cigar_type: Sub, |
| 758 | bases: Some(vec!['C']), |
| 759 | length: Some(1), |
| 760 | }, |
| 761 | InnerPlotCigar { |
| 762 | cigar_type: Sub, |
| 763 | bases: Some(vec!['G']), |
| 764 | length: Some(1), |
| 765 | }, |
| 766 | InnerPlotCigar { |
| 767 | cigar_type: Ins, |
| 768 | bases: Some(vec!['G', 'G', 'T']), |
| 769 | length: None, |
| 770 | }, |
| 771 | ]); |
| 772 | let expected_string = "50=|3d|10=|1C|1G|iGGT".to_string(); |
| 773 | assert_eq!(plot_cigar.to_string(), expected_string); |
| 774 | } |
| 775 | |
| 776 | #[test] |
| 777 | fn test_read_ordering() { |