# Phasing problem using "samtools phase"

so I'm having a problem using samtools phase. I'm trying to phase my .bam archives that where generated by aligning my samples with my reference genome. Following the documentation I tried the command:

samtools phase -A my_referenceGenome.fasta my_sample_toBePhased.bam

The -A flag stands for dropping reads with ambiguous phase. The error I get is: [W::sam_read1] Parse error at line 1. I generated .bam files with and without the SAM header but the error persists.

I feel like I am missing something basic but that isn't clearly stated anywere. Does the my_referenceGenome.fasta archive needs to be previously phased? If so, how can I do it?

Thank you so much!

Usage:   samtools phase [options] <in.bam>

      --reference FILE