
MPSBam2fq is used to convert SAM files generated by MapSplice 2.0 to FASTQ files.

BAM files can be converted to SAM files with SAMTOOLS, see http://samtools.sf.net :
	samtools view -h <in.bam> > <out.sam>

Building MPSBam2fq
	To build MPSBam2fq, go to its directory, and run "make".
	
Usage:
	./MPSBam2fq <input_SAM_file> <output_sorted_SAM_file_name> <output_FASTQ_file_name> <tmp_dir_name>

<tmp_dir_name>:	Default temporary directorty is ./

Output: 
If reads are single-end, output will be a sorted SAM file and a FASTQ file.
If reads are pair-end, output will be a sorted SAM file and two FASTQ file.	

For example:

Command Line:
	./MPSBam2fq /.../C.sam C_sorted.sam C_output.fq C_tmp

Output
If reads in /.../C.sam are single-end, output will be C_sorted.sam, C_output.fq .
If reads in /.../C.sam are pair-end, output will be C_sorted.sam, C_output.fq.1 and C_output.fq.2 .  


