Mapping: Bacteria - AndreaRP/METAGENOMICS GitHub Wiki
Graph
Single sample: [mapper_bac.sh] (https://github.com/AndreaRP/METAGENOMICS/blob/wrapper/mapper_bac.sh)
bash mapper_bacteria.sh [BACTERIA_GENOME_REFERENCE] [HOST_FREE_READS_DIR]
Multiple samples: [wrapper_bacteria_mapper.sh] (https://github.com/AndreaRP/METAGENOMICS/blob/wrapper/wrapper_bacteria_mapper.sh)
bash wrapper_bacteria_mapper.sh
Note: To run [wrapper_bacteria_mapper.sh] (https://github.com/AndreaRP/METAGENOMICS/blob/wrapper/wrapper_bacteria_mapper.sh) you must have generated the sample name list with Sample Name list generator
In a nutshell...
-
- Creates necessary directories.
-
- Maps against bacteria WG reference genome.
-
- Creates fastq files using the bam generated by bowtie2 which contains only reads that mapped the bacteria WG reference.
-
- Maps against bacteria 16S reference genome.
-
- Creates fastq files using the bam generated by bowtie2 which contains only reads that mapped the bacteria 16S reference.
Note: This script should be run after filtering the host.
##I/O
-
Arguments:
- $1 (bacDB) = Directory of bacteria reference genome (REFERENCES/BACTERIA_GENOME_REFERENCE/).
- $2 (sampleDir) = Directory containing host-free files. (ANALYSIS/04-noHost/sampleName/)
-
Input Files: (In ANALYSIS/04-noHost/sampleName/)
- sampleName_noHost_R1.fastq: fastq file with the R1 reads of the sample after filtering the host.
- sampleName_noHost_R2.fastq: fastq file with the R2 reads of the sample after filtering the host.
-
Output files: (In ANALYSIS/05-bacteria/sampleName/reads/)
- sampleName_WG_bacteria_R1.fastq: .fastq file with R1 reads that mapped the bacteria WG DB.
- sampleName_WG_bacteria_R2.fastq: .fastq file with R2 reads that mapped the bacetria WG DB.
- sampleName_WG_bacteria_sorted.bam: sorted BAM file with the reads that mapped against the bacteria Whole Genome reference.
- sampleName_WG_bacteria_sorted.bam.bai: index of the BAM file.
- sampleName_WG_bacteria_mapping.log: .log file with a log of the mapping of bacteria WG DB.
- (sampleName_WG_bacteria_mapped.sam: SAM file from mapping the processed files against bacteria Whole Genome reference. Intermediary file deleted on the run)
- (sampleName_WG_bacteria_mapped.bam: BAM file from mapping the processed files against bacteria Whole Genome reference. Intermediary file deleted on the run)
- sampleName_bacteria_R1_16S.fastq: .fastq file with R1 reads that mapped the bacteria 16S DB.
- sampleName_bacteria_R2_16S.fastq: .fastq file with R2 reads that mapped the bacetria 16S DB.
- sampleName_bacteria_sorted_16S.bam: sorted BAM file with the reads that mapped against the bacteria 16S reference.
- sampleName_bacteria_sorted.bam_16S.bai: index of the BAM file.
- sampleName_bacteria_mapping_16S.log: .log file with a log of the mapping of bacteria 16S DB.
- (sampleName_bacteria_mapped_16S.sam: SAM file from mapping the processed files against bacteria 16S reference. Intermediary file deleted on the run)
- (sampleName_bacteria_mapped_16S.bam: BAM file from mapping the processed files against bacteria 16S reference. Intermediary file deleted on the run)