4. Initialize the RNASeqMetrics object
main code
metrics.prepareOptionsFromCommandLine(cl);
The main task is to inject the input parameters into the RNASeqMetrics object and create an output directory (according to the -o parameter).
Generate refGene.txt file according to gtf
Generate rRNA_intervals.txt file if there is no rRNA parameter
SAMPLE_FILE attribute is bam file
TRANSCRIPT_MODEL is a gtf file
REF_GENOME is fasta file
5. Read in the analysis file
main code
private void prepareFiles()
read in bam file
this.bams = MetricSample.readInSamples(this.SAMPLE_FILE, this.OUT_DIR);
looking for contig names in reference fai file--read into the fai file, that is, the index of fasta
ArrayList contigs = getOrderedContigsFAI(REF_GENOME);
Load gtf file transcripts as transcript list
TranscriptList transcripts = TranscriptList.loadGTF(TRANSCRIPT_GTF, transcriptTypeField);
Generate data in refGene.txt file based on replica list and fasta index data contigs.
List replicas in configs order
Among them, the rna type is written into rRNA_intervals.txt
transcripts.toRRNAIntervalList(rRNAIntervalFile);