Bam file to fasta file - Genome assembly

Is there a protocol you are following? Combining new reads (pre-assembled or not) with an existing assembly to close/fill gaps involves processing steps beyond simply mapping one to the other. Please start by reviewing these Galaxy Tutorials and linked references:

More about how/where to run tutorials:

Not all assembly-related tools are covered in the tutorials, but this should give you an idea of where you are now and possible analysis paths. If your genome is smaller (prokaryotic), using a public Galaxy server can work. For larger genomes (eukaryotic), more resources will likely be needed – and that would involve setting up your own Galaxy server with sufficient resources. Any tool that you want to use could be wrapped for Galaxy if it hasn’t been already – check the ToolShed Galaxy | Tool Shed to find out of wrapped or not.

We can follow up from there as needed: e.g. help for how to wrap a tool or request that it be wrapped, appropriate domain-specific public Galaxy servers, how to set up your own Galaxy, and the like.