Entering edit mode
3.6 years ago
ICfc97
▴
20
Hi! I'm trying to use PRISM program to detect CNVs and the input files have to be .SAM files for each chromosome, I have the .BAM file of each sample but I don't know it it is convenient to convert it to .SAM and the n split it or the contrary.
for file in *_chr.bam; do
filename=`echo $file | cut -d “.” -f 1`;
for chrom in `seq 1 22` X Y; do
samtools view -bh $file chr${chrom} > ${filename}_${chrom}.bam;
done;
done
If you want SAM files the use: