@@ -165,14 +165,14 @@ Examples:
165165 }
166166 records = append (records , record .Clone ())
167167 if len (records ) == size {
168- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , i , fileExt ))
168+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , i , fileExt ))
169169 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
170170 i ++
171171 records = []* fastx.Record {}
172172 }
173173 }
174174 if len (records ) > 0 {
175- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , i , fileExt ))
175+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , i , fileExt ))
176176 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
177177 }
178178
@@ -233,7 +233,7 @@ Examples:
233233
234234 n := 1
235235 if len (IDs ) > 0 {
236- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , n , fileExt ))
236+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , n , fileExt ))
237237 if ! dryRun {
238238 outfh , err = xopen .Wopen (outfile )
239239 checkError (err )
@@ -260,7 +260,7 @@ Examples:
260260 log .Infof ("write %d sequences to file: %s\n " , j , outfile )
261261 }
262262 n ++
263- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , n , fileExt ))
263+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , n , fileExt ))
264264 if ! dryRun {
265265 outfh .Close ()
266266 outfh , err = xopen .Wopen (outfile )
@@ -323,14 +323,14 @@ Examples:
323323 }
324324 records = append (records , record )
325325 if len (records ) == size {
326- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , i , fileExt ))
326+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , i , fileExt ))
327327 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
328328 i ++
329329 records = []* fastx.Record {}
330330 }
331331 }
332332 if len (records ) > 0 {
333- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , i , fileExt ))
333+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , i , fileExt ))
334334 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
335335 }
336336 return
@@ -402,7 +402,7 @@ Examples:
402402
403403 n := 1
404404 if len (IDs ) > 0 {
405- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , n , fileExt ))
405+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , n , fileExt ))
406406 if ! dryRun {
407407 outfh , err = xopen .Wopen (outfile )
408408 checkError (err )
@@ -429,7 +429,7 @@ Examples:
429429 log .Infof ("write %d sequences to file: %s\n " , j , outfile )
430430 }
431431 n ++
432- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , fileName , n , fileExt ))
432+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.part_%03d%s" , filepath . Base ( fileName ) , n , fileExt ))
433433 if ! dryRun {
434434 outfh .Close ()
435435 outfh , err = xopen .Wopen (outfile )
@@ -488,7 +488,7 @@ Examples:
488488
489489 var outfile string
490490 for id , records := range recordsByID {
491- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.id_%s%s" , fileName , id , fileExt ))
491+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.id_%s%s" , filepath . Base ( fileName ) , id , fileExt ))
492492 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
493493 }
494494 return
@@ -566,7 +566,7 @@ Examples:
566566 var record * fastx.Record
567567 for id , ids := range idsMap {
568568
569- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.id_%s%s" , fileName , id , fileExt ))
569+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.id_%s%s" , filepath . Base ( fileName ) , id , fileExt ))
570570 if ! dryRun {
571571 outfh , err = xopen .Wopen (outfile )
572572 checkError (err )
@@ -664,7 +664,7 @@ Examples:
664664
665665 var outfile string
666666 for subseq , records := range recordsBySeqs {
667- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.region_%d:%d_%s%s" , fileName , start , end , subseq , fileExt ))
667+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.region_%d:%d_%s%s" , filepath . Base ( fileName ) , start , end , subseq , fileExt ))
668668 writeSeqs (records , outfile , lineWidth , quiet , dryRun )
669669 }
670670 return
@@ -753,7 +753,7 @@ Examples:
753753 var outfile string
754754 var record * fastx.Record
755755 for subseq , chrs := range region2name {
756- outfile = filepath .Join (outdir , fmt .Sprintf ("%s.region_%d:%d_%s%s" , fileName , start , end , subseq , fileExt ))
756+ outfile = filepath .Join (outdir , fmt .Sprintf ("%s.region_%d:%d_%s%s" , filepath . Base ( fileName ) , start , end , subseq , fileExt ))
757757 if ! dryRun {
758758 outfh , err = xopen .Wopen (outfile )
759759 checkError (err )
0 commit comments