ERROR: The Viral Sequence Clusters mode with fasta files requires to specify a SAM output file

Hello,

I’m following your metaphlan tutorial with my own samples. In the tutorial for viral profiling, the tutorial states: To profile a sample, simply add the --profile_vsc option to the standard command.

Below is my metaphlan command where my input is in the format of sample###.fq :

    metaphlan "$input_file" \
        --input_type fastq \
        --mapout "$bowtie2_output" \
        --nproc 32 \
        --db_dir "$db" \
        --index mpa_vJan25_CHOCOPhlAnSGB_202503 \
        -o "$output_txt" \
        -t rel_ab_w_read_stats \
        --profile_vsc \
        --vsc_out "$metaphlan_output_dir/${sample}_profiled.vsc.txt"

And I’m getting the following error:

[Error] The Viral Sequence Clusters mode with fasta files requires to specify a SAM output file with the -s parameter
Stop execution.

Hi @irvinng98

You’re right we should include this in the tutorial, you need to add a parameter to save the mapping results (-s sam_file.sam ). This is required in case in the future you want to rerun the analysis of viral sequences by giving as input the mapped file (–input_type sam) instead of repeating the mapping

1 Like