Skip to content
Steve Bond edited this page Feb 17, 2016 · 3 revisions

--make_ids_unique, -miu

Description

It is often problematic if multiple records in a single file have the exact same ID, so use this tool to prepend numbers to the ends of repeated IDs to make them unique.

Arguments

Separator ( string )

Optional. Add some string to separate the original ID from the new numbers being appended.

Padding ( int )

Optional. Pad the identifier number with zeros.

Examples

Input file: Duplicates.fa

>Seq10A
mrlsekstshdckacitrshnddcarrwgitiddgwdqlnrsfmfgllvv
>Seq10B
mrlqekstshdckacitrshnedcarrwgitiddgwdqlnrsfmfgllvg
>Seq11
mlisslvqfsrlspfkeitiddgwdqlnrsfmfvlmvicgtivtvrqhtg
>Seq12A
mvidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A
mkidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A
mvifilsgfkgitpfygitlddgwsqinrsfmfvlcvlmgtvvtvrqyaa
>Seq13
sfrseafvdeycwtqgiytlreaydlentkipypgiipegfpncmpyerw

Usage example 1

$: sb Duplicates.fa -miu

Output

>Seq10A
mrlsekstshdckacitrshnddcarrwgitiddgwdqlnrsfmfgllvv
>Seq10B
mrlqekstshdckacitrshnedcarrwgitiddgwdqlnrsfmfgllvg
>Seq11
mlisslvqfsrlspfkeitiddgwdqlnrsfmfvlmvicgtivtvrqhtg
>Seq12A1
mvidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A2
mkidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A3
mvifilsgfkgitpfygitlddgwsqinrsfmfvlcvlmgtvvtvrqyaa
>Seq13
sfrseafvdeycwtqgiytlreaydlentkipypgiipegfpncmpyerw

Usage example 2

$: sb Duplicates.fa -miu 4

Output

>Seq10A
mrlsekstshdckacitrshnddcarrwgitiddgwdqlnrsfmfgllvv
>Seq10B
mrlqekstshdckacitrshnedcarrwgitiddgwdqlnrsfmfgllvg
>Seq11
mlisslvqfsrlspfkeitiddgwdqlnrsfmfvlmvicgtivtvrqhtg
>Seq12A0001
mvidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A0002
mkidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A0003
mvifilsgfkgitpfygitlddgwsqinrsfmfvlcvlmgtvvtvrqyaa
>Seq13
sfrseafvdeycwtqgiytlreaydlentkipypgiipegfpncmpyerw

Usage example 3

$: sb Duplicates.fa -miu 4 "-"

Output

>Seq10A
mrlsekstshdckacitrshnddcarrwgitiddgwdqlnrsfmfgllvv
>Seq10B
mrlqekstshdckacitrshnedcarrwgitiddgwdqlnrsfmfgllvg
>Seq11
mlisslvqfsrlspfkeitiddgwdqlnrsfmfvlmvicgtivtvrqhtg
>Seq12A-0001
mvidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A-0002
mkidilsgfkgitpfkgitlddgwdqinrsfmfvlcvlmgtvvtvrqyag
>Seq12A-0003
mvifilsgfkgitpfygitlddgwsqinrsfmfvlcvlmgtvvtvrqyaa
>Seq13
sfrseafvdeycwtqgiytlreaydlentkipypgiipegfpncmpyerw

Main Toolkit Pages





Further Reading

Clone this wiki locally