TITLE: Consensus Sequence Generation Protocol: Leveraging Variant Analysis in Mulberry Genotypes
AUTHORS: Vidya Niranjan, Lavanya C, Shri Ganapathi, Spoorthi R Kulkarni

[DESCRIPTION]
This research investigates four distinct Mulberry genotypes, each offering valuable traits essential for sericulture and broader agricultural sustainability. Notably, Thailand Male is examined for genetic variations associated with superior leaf yield, potentially informing selective breeding efforts for cultivars providing optimal nutrition to silkworms. Assam Bol's resistance to root rot diseases is explored to elucidate genetic factors, promising the development of disease-resistant Mulberry varieties and reducing reliance on chemical interventions. The drought-resistant S1 genotype's genetic resilience is scrutinized to develop Mulberry cultivars capable of withstanding water scarcity amid climate change challenges. Furthermore, the study assesses Punjab Local's nitrogen use efficiency, crucial for enhancing agricultural productivity while mitigating environmental impact. Employing advanced genetic analysis techniques, including SNP and SSR markers, this research aims to revolutionize Mulberry agriculture by identifying genetic markers, establishing linkage maps, and creating diagnostic tools. Ultimately, this endeavor seeks to enhance economic viability and environmental sustainability within the sericulture industry.
The current protocol is designed for development of consensus for mulberry genome. But the protocol can be used for other species too.

[BEFORE_START]
Scripting and Command line operation should be known
The Server with higher configuration to be used for the protocol

The GATK has some filter values which will change according to the sample. The User has to set the values accordingly. 
Java file has to be installed properly

[GUIDELINES]
Kindly use the current commands in Ubuntu 20.04

[STEPS]
SECTION: SAMPLE COLLECTION AND REFERENCE GENOME
1. Collection of the Whole genome sequences and the Reference genome for Morus Indica (Mulberry)

The high-depth sequencing of multiple mulberry accessions were sequenced via Illumina platform and the fastq files were retrieved from MindGP an Indian repository of Mulberry data.. The project involves generation of a high-density SNP map for various genotyping applications.

 

 

 

SECTION: ALIGNMENT AND MAPPING
3. The alignment and mapping process begins by indexing the reference genome for efficient alignment using BWA MEM. The aligned sequences are then stored in a SAM file format. Next, SAMtools is employed to convert the SAM file to the binary BAM format and to sort the aligned reads based on their genomic coordinates. This sorting step optimizes downstream analyses such as variant calling and consensus sequence generation.
 

SECTION: SAMPLE COLLECTION AND REFERENCE GENOME
2. Reference genome 

The Morus indica species have 365 sequenced contigs which were combined together to get a whole reference genome.
The concatenated file was used for alignment and mapping of the fastq files and was named as mulberry_reference.fasta

 






SECTION: ALIGNMENT AND MAPPING
4. 
 

 

SECTION: VARIANT CALLING USING GATK PIPELINE
5. The GATK pipeline processes raw sequencing data by initially aligning reads to a reference genome and then recalibrating base quality scores to improve accuracy. Variant calling algorithms identify potential variants, including SNPs, which are subsequently filtered for high quality using variant quality score recalibration. Filtered variants are annotated with functional information before a consensus sequence is generated by incorporating the most common variant at each genomic position across all samples. This approach ensures reliable SNP identification, filtering, and consensus sequence generation.
SECTION: VARIANT CALLING USING GATK PIPELINE
6. The provided command is using the Picard tools, specifically the MarkDuplicates tool, in a Java environment. Let's break down the command:

SECTION: CONSENSUS GENERATION
13. The process combines information from multiple variants to generate a single consensus sequence. The consensus sequence provides a comprehensive summary of the genetic variation present in the samples and serves as a reference for downstream analysis, such as functional annotation or comparative genomics.
 


 

 

 

 

SECTION: VARIANT CALLING USING GATK PIPELINE
7. java -jar picard.jar: This part of the command indicates that you are running a Java application and specifying the JAR (Java Archive) file picard.jar, which contains the Picard tools.
MarkDuplicates: This is the specific Picard tool being invoked. It is used to identify and mark duplicate reads in a BAM (Binary Alignment/Map) file.
INPUT=<SRRID>_sorted.bam: Specifies the input BAM file with aligned reads. <SRRID>_sorted.bam is a placeholder where <SRRID> represents the actual sample or experiment identifier. You would replace <SRRID> with the specific identifier for your data.
OUTPUT=<SRRID>_dedup_reads.bam: Specifies the output BAM file where the deduplicated reads will be written. <SRRID>_dedup_reads.bam is a placeholder for the deduplicated file, and the actual filename will be determined by the provided sample or experiment identifier.
METRICS_FILE=<SRRID>_metrics.txt: Specifies the file where metrics about the duplication process will be written. The metrics include information about the number of duplicates, optical duplicates, and other statistics. <SRRID>_metrics.txt is a placeholder for the metrics file, and the actual filename will be determined by the provided sample or experiment identifier.
 


SECTION: VARIANT CALLING USING GATK PIPELINE
8. CollectAlignmentSummaryMetrics tool, to collect alignment summary metrics from a BAM (Binary Alignment/Map) file. Let's break down the command:

java -jar picard.jar: This part of the command indicates that you are running a Java application and specifying the JAR (Java Archive) file picard.jar, which contains the Picard tools.
CollectAlignmentSummaryMetrics: This is the specific Picard tool being invoked. It is used to collect summary metrics about the alignment from a BAM file.
R=mulberry_reference.fasta: Specifies the reference genome in FASTA format against which the reads were aligned. mulberry_reference.fasta is a placeholder, and you would replace it with the actual filename of your reference genome.
I=<SRRID>_dedup_reads.bam: Specifies the input BAM file containing deduplicated reads. <SRRID>_dedup_reads.bam is a placeholder, and you would replace <SRRID> with the specific identifier for your sample or experiment.
O=<SRRID>_alignment_metrics.txt: Specifies the output file where alignment summary metrics will be written. <SRRID>_alignment_metrics.txt is a placeholder, and the actual filename will be determined by the provided sample or experiment identifier.
 

SECTION: VARIANT CALLING USING GATK PIPELINE
9. 
 

SECTION: VARIANT CALLING USING GATK PIPELINE
10. AddOrReplaceReadGroups adds or replaces read groups in a BAM (Binary Alignment/Map) file. Read groups are metadata associated with sequencing data and are important for downstream analysis. Let's break down the command:

java -jar picard.jar: This part of the command indicates that you are running a Java application and specifying the JAR (Java Archive) file picard.jar, which contains the Picard tools.
AddOrReplaceReadGroups: This is the specific Picard tool being invoked. It is used to add or replace read group information in a BAM file.
I=<SRRID>_dedup_reads.bam: Specifies the input BAM file containing deduplicated reads. <SRRID>_dedup_reads.bam is a placeholder, and you would replace <SRRID> with the specific identifier for your sample or experiment.
O=<SRRID>_sorted_dedupreads.bam: Specifies the output BAM file where the reads with added or replaced read groups will be written. <SRRID>_sorted_dedupreads.bam is a placeholder, and the actual filename will be determined by the provided sample or experiment identifier.
RGID=4: Specifies the Read Group ID. It is a unique identifier for the read group. In this case, it’s set to 4.
RGLB=lib1: Specifies the Read Group Library. It represents the library from which the sequencing data originates.
RGPL=ILLUMINA: Specifies the Read Group Platform. It indicates the platform used for sequencing, and here it’s set to ILLUMINA.
RGPU=unit1: Specifies the Read Group Platform Unit. It provides additional information about the flowcell or lane, and here it’s set to unit1.
RGSM=20: Specifies the Read Group Sample Name. It represents the sample name associated with the read group. Here, it’s set to 20.

 

SECTION: VARIANT CALLING USING GATK PIPELINE
11. 
 

SECTION: VARIANT CALLING USING GATK PIPELINE
12. Now that the Preprocessing is been performed, The GATK Pipeline is run to get the indels and the SNPs