I have the following path:
f_file = /home/reads_dataset_1/E2_ER/E2_ER_exp1_L1.fastq.gz
And I'd like to get only the base file name without the 2 extensions (that is, without .fastq.gz):
E2_ER_exp1_L1
Tried:
sample_name = os.path.splitext(f_file)[0]
But I got the whole name of the path without the last extension.