Hi Tom, thanks a lot for the suggestion. It works! Sean
> Date: Thu, 26 Mar 2015 13:14:38 +0000
> From: tbla...@umich.edu
> To: ying_c...@live.com
> CC: samtools-help@lists.sourceforge.net
> Subject: Re: [Samtools-help] samtools split output filename format string
> error
>
>
> Perhaps this is a quoting issue. I would try putting single quotes around
> the -f format string in the cammand line, rather than double quotes.
>
> - tom blackwell -
>
> On Thu, 26 Mar 2015, ying chen wrote:
>
> > Hi,
> >
> > I am trying to use samtools split command to split my bam file into small
> > bam files by read group. The input bam files are the CCLE RNASeq bams.
> > It worked when I did
> >
> > samtools split -u G20486.Calu-1.2_noRG.bam -f "%*_%#.bam" -v
> > G20486.Calu-1.2.bam
> > It generated bam files with suchs as G20486.Calu-1.2_0.bam,
> > G20486.Calu-1.2_1.bam, ...
> > Then I tried to add RG id into resulting bam file names by
> > samtools split -u G20486.Calu-1.2_noRG.bam -f "%*_%!_%#.bam" -v
> > G20486.Calu-1.2.bam
> > and I got the error message:
> > bash: !_%#.bam: event not found
> > It seems that samtools split has trouble identifying RG ID. I tried and
> > could not find much info or documentation regarding samtools split except
> > the samtools help split.
> > Here are the bam file itself:
> > samtools view G20486.Calu-1.2.bam | more
> > C0UNPACXX120727:2:1207:1813:5925 419 1 11615 1 101M
> > = 11780 266 TAGGAATG
> > CCTGTTTCTCCACAAAGTGTTTACTTTTGGATTTTTGCCAGTCTAACAGGTGAAGCCCTGGAGATTCTTATTAGTGATTTGGGCTGGGGCCTG
> > <@@DFFFDDDFHBHII
> > G4I@?FCEHHFFBGEEHI@HDGCD@GFFG@GEGGBHHIBFHDIICHHG>@GHIDD7=A)?EHHFF:@>CFCCCE6?ABD<=/;5?
> > CC:Z:15 PG:Z:tophat.D
> > RG:Z:C0UNP.2 NH:i:3 HI:i:0 NM:i:0 CP:i:102519455 MQ:i:1 UQ:i:0
> > C0UNPACXX120727:5:2214:18693:14398 163 1 11615 1 101M
> > = 11780 266 TAGGAATG
> > CCTGTTTCTCAACAAAGTGTTTACTTTTGGATTTTTGCCAGTCTAACAGGTGAAGCCCTGGAGATTCTTATTAGTGATTTGGGCTGGGGCCTG
> > ?@@DD>DAAF4AAEFH
> > EF,<<CF;FAFAC?HCC<CGHA*:CDH>DCHFHHEDBH?8DH8CFIJIIG;6;(@E>EFEE>=@BC;@>>A##############
> > CC:Z:15 PG:Z:tophat.8 RG:Z:C0UNP.5 NH:i:3 HI:i:0 NM:i:1
> > CP:i:102519455 MQ:i:1 UQ:i:11
> >
> Any help would be greatly appreciated!
> >
> >
> Best regards,
> >
> > Sean
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help