GENERAL INFORMATION

1. Title of dataset: “R Code and Re-analyzed Datasets for:  Robust approaches to the quantitative analysis of genome formula variation in multipartite and segmented viruses”

2. Author information
Corresponding investigator 1:
Name: Dr. Mark P. Zwart
Institution: Netherlands Institute of Ecology (NIOO-KNAW), Wageningen, The Netherlands
Email: M.Zwart@nioo.knaw.nl

Co-investigator 1:
Name: Marcelle L. Johnson 
Institution: Netherlands Institute of Ecology (NIOO-KNAW), Wageningen, The Netherlands

3. Funding sources:
This research was funded by the Dutch Research Council (NWO), grant number 016.Vidi.171.061.
  
4. Recommended citation for this dataset: 
Johnson, M.L. & Zwart, M.P. (2023) R Code and Re-analyzed Datasets for:  Robust approaches for the quantitative analysis of genome formula variation in multipartite and segmented viruses, Zenodo. 

DATA AND FILE OVERVIEW

1. Description of dataset
This submission includes all the scripts and data analyzed in the manuscript “Robust approaches to the quantitative analysis of genome formula variation in multipartite and segmented viruses”. This manuscript is a technical note on how genome formula data can be analyzed. There are no new experimental data in the manuscript, as published datasets are re-analyzed. Here we reproduce those datasets as formatted for our analysis, for the convenience of the reader.
The corresponding paper was published in Viruses 16(2): 270. (https://doi.org/10.3390/v16020270).

2. File list:
R_Markdown_File_1_Genome_Formula_Distance_Metric_Properties.html
R_Markdown_File_2_AMV_genome_formula_distance.html
Dataset_1_AMV_Wu.csv
R_Markdown_File_3_CMV_genome_formula_distance.html
Dataset_2_CMV_Boezen.csv
R_Markdown_File_4_FBNSV_genome_formula_distance.html
Dataset_3_FBNSV_Sicard_Fig_3A.csv
Dataset_4_GF_dist_results_FBNSV.csv
R_Markdown_File_5_CMV_genome_formula_comparison.html
Dataset_5_CMV_Boezen_2.csv
R_Markdown_File_6_AMV_genome_formula_comparison.html
Dataset_6_AMV_Wu_2.csv
R_Markdown_File_7_FBNSV_genome_formula_comparison_1.html
R_Markdown_File_8_FBNSV_genome_formula_comparison_2.html
Dataset_7_FBNSV_Sicard_Fig_2b.csv
R_Markdown_File_9_Delta_GF_Metric_Properties.html

3. SPECIFIC INFORMATION FOR DATAFILES AND SCRIPTS

R_Markdown_File_1_Genome_Formula_Distance_Metric_Properties.html
R markdown file used to determine characteristics of the genome formula distance metric. The script does not require any further files to run. This script generates the results described in Sections 3.1.3 and 3.1.4, Table 2, and Figure 3.

R_Markdown_File_2_AMV_genome_formula_distance.html
R markdown file used to calculate the genome formula distance for the AMV data. The associated data file is Dataset_1_AMV_Wu.csv. The script generates results associated with Section 3.2.1 and Table 3. Note that the code must be modified to obtain results for different leaves, by altering which data are filtered (e.g., now set to sample == 1 to analyze only the inoculated leaf data).

Dataset_1_AMV_Wu.csv
Genome formula data for AMV infection of Nicotiana benthamiana, originating from 
Number of variables: 5
Number of rows: 18
Variable list: 
	1. plant: the number assigned to the plant.
	2. sample: the leaf analyzed, with 1 being the inoculated leaf, 2 the lower leaf, and 3 the upper leaf.
	3-5. Relative frequencies of AMV RNAs 1-3.

R_Markdown_File_3_CMV_genome_formula_distance.html
R markdown file used to calculate the genome formula distance for the CMV data. The associated data file is Dataset_2_CMV_Boezen.csv. The script generates results associated with Section 3.2.1 and Table 3.

Dataset_2_CMV_Boezen.csv
Genome formula data for CMV infection of Nicotiana tabacum, originating from doi.org/10.3389/fviro.2023.1225818.
Number of variables: 7
Number of rows: 9
Variable list: 
	1. q PCR plate: the qPCR plate on which the sample was run.
	2. Sample: the number given to the plant in the processing of samples.
	3. Treatment: viruses used to inoculate the sample, as these data come from a mixed-infection study. For these samples, only CMV was used.
	4. Symptoms: any symptoms observed in the inculated plants.
	5-7. Relative frequencies of CMV RNAs 1-3.

R_Markdown_File_4_FBNSV_genome_formula_distance.html
R markdown file used to calculate the genome formula distance for the FBNSV data, as well as running a statistical test on the effect of leaf level on the mean genome formula distance. The associated data files are Dataset_3_FBNSV_Sicard_Fig_3a.csv for the genome formula distance calculation, and Dataset_4_GF_dist_results_FBNSV.csv for the statistical analysis of leaf level and genome formula distance. The script generates results associated with Section 3.2.1 and Table 3.

Dataset_3_FBNSV_Sicard_Fig_3A.csv
Genome formula data for FBNSV infection of Vicia faba, originating from doi.org/10.1038/ncomms3248 Figure 3a. Data were shared by Stéphane Blanc.
Number of variables: 10
Number of rows: 77
Variable list: 
	1. Plant: code identifying the plant from which the leaf sample was taken.
	2. Leaf: the leaf level sampled, with 1 being the inoculated leaf. 
	3-10. Relative frequencies of FBNSV DNA segments C, M, N, R, S, U1, U2, and U4, respectively.

Dataset_4_GF_dist_results_FBNSV.csv 
Genome formula distance data obtained with R Markdown File 4, and aggregated for further analysis.
Number of variables: 2
Number of rows: 77
Variable list: 
	1. Leaf: the leaf level sampled, with 1 being the inoculated leaf. 
	2. The mean genome formula distance for each individual plant in the analysis.

R_Markdown_File_5_CMV_genome_formula_comparison.html
R markdown file used to determine whether there are significant differences in the genome formula, as measured for CMV in three hosts with four different methods. The associated data file is Dataset_5_CMV_Boezen_2.csv. The script generates results associated with Section 3.2.2, Appendix A and Table A1.

Dataset_5_CMV_Boezen_2.csv
Genome formula data for CMV infection of Nicotiana tabacum, Nicotiana benthamiana and Chaenopodium quinoa originating from doi:10.1016/j.virusres.2023.199064.
Number of variables: 9
Number of rows: 48
Variable list: 
	1. T_Host: The host treatment (Nt = Nicotiana tabacum, Nb = Nicotiana benthamiana and Cq = Chaenopodium quinoa)
	2. T_Method: The method used for genome formula quantification.
	3. Host: numerical coding of column 1.
	4. Method: numerical coding of column 2.
	5. Unique: a unique numerical code for each treatment
	6. Replicate: experimental replicate, corresponding to the plant used.
	7-9. Relative frequencies of CMV RNAs 1-3.

R_Markdown_File_6_AMV_genome_formula_comparison.html
R markdown file used to determine whether there is a significant differences in the genome formula, as measured for AMV in inoculated leaves with different ratios of RNAs 1-3. The script also performs a re-sampling analysis based on the inoculum genome formula. The associated data file is Dataset_6_AMV_Wu_2.csv. The script generates results associated with Section 3.2.2, Section 3.2.3, Table 4, Figure 4, Appendix A, Appendix B and Figure A1.

Dataset_6_AMV_Wu_2.csv
Genome formula data for CMV infection of Nicotiana tabacum, Nicotiana benthamiana and Chaenopodium quinoa originating from doi:10.1016/j.virusres.2023.199064.
Number of variables: 17
Number of rows: 79
Variable list: 
	1. Ratio_in: identifies the inoculum used based on numerical index used in the original paper
	2-4. Parts RNA1-3 in the inoculum, respectively.
	5. Sum of columns 2-4.
	6-8. Relative frequencies in the inoculum, derived from columns 2-4.
9. plant: the number assigned to the plant
	10. sample: the leaf analyzed, with 1 being the inoculated leaf, 2 the lower leaf, 3 the upper leaf, and 4 the remaining tissues.
	11-13. Accumulation of CMV RNAs 1-3.
	14. Sum of columns 11-13.
15-17. Relative frequencies of AMV RNAs 1-3.

R_Markdown_File_7_FBNSV_genome_formula_comparison_1.html
R markdown file used to determine whether there are significant differences in the genome formula, as measured for FBNSV is different leaf levels in Vicia faba. The associated data file is Dataset_3_FBNSV_Sicard_Fig_3a.csv. The script generates results reported in Section 3.2.2 and Appendix A.

R_Markdown_File_8_FBNSV_genome_formula_comparison_2.html
R markdown file used to determine whether there a significant differences in the genome formula, as measured for FBNSV is different host plant species, Vicia faba and Medicago truncatula. The associated data file is Dataset_7_FBNSV_Sicard_Fig_2b.csv. The script generates results reported in Section 3.2.2, Appendix A and Table A2.

Dataset_7_FBNSV_Sicard_Fig_2b.csv
Genome formula data for FBNSV infection of Vicia faba and Medicago truncatula, originating from doi.org/10.1038/ncomms3248 Figure 2b. Data were shared by Stéphane Blanc.
Number of variables: 13
Number of rows: 73
Variable list: 
	1. Uni_code: a unique code that identifies the treatment, following the convention in the original paper.
	2. Host, 1 = Vicia faba and 2 = Medicago truncatula.
3. Block: block for the experiments.
4. Uni_Num: a unique number assigned to all blocks (over both treatments), for performing an analysis by experiment.
	5. Plant: numerical code assigned to each plant by us (not from orginal study).
	6-13. Relative frequencies of FBNSV DNA segments C, M, N, R, S, U1, U2, and U4, respectively.

R_Markdown_File_9_Delta_GF_Metric_Properties.html
R markdown file used to determine characteristics of the delta GF metric. The script does not require any further files to run. This script generates the results mentioned in Section 4.1 and described in Appendix C and Table A3.