-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8212b1
commit eb5522b
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pandas as pd | ||
import subprocess | ||
|
||
# Step 1: Read the sample sheet | ||
sample_sheet = pd.read_csv('samplesheet.csv') | ||
|
||
# Step 2: Run FastQC | ||
for index, row in sample_sheet.iterrows(): | ||
fastqc_command = f"fastqc {row['file_path']} -o ./fastqc_results/" | ||
subprocess.run(fastqc_command, shell=True) | ||
|
||
# Step 3: Run MultiQC | ||
multiqc_command = "multiqc ./fastqc_results/ -o ./multiqc_report/" | ||
subprocess.run(multiqc_command, shell=True) | ||
|
||
# Step 4: Run STAR aligner | ||
for index, row in sample_sheet.iterrows(): | ||
star_command = f"STAR --genomeDir /path/to/genome --readFilesIn {row['file_path']} --outFileNamePrefix ./star_results/{row['sample_id']}" | ||
subprocess.run(star_command, shell=True) | ||
|
||
# Step 5: Index BAM files with Samtools | ||
for index, row in sample_sheet.iterrows(): | ||
bam_file = f"./star_results/{row['sample_id']}.bam" | ||
samtools_command = f"samtools index {bam_file}" | ||
subprocess.run(samtools_command, shell=True) | ||
|