problem with replace command with tr

I have a sample file like this

7829885    7831552    +    1    1667,    0,
35934936    35937087    -    2    1281,870,    0,1281,

I would like to replace values starts with comma with just value like 0, to 0 or 1667, to 1667.
I can do with this by using tr -d '0,' '0' <file

But the problem having here is I would like to replace only single value that has comma like 0, or 1667, not the multiple valuse with commas like 1281,870, or 0,1281,
Briefly with out confusion
I have to remove the commas of all single values (1667 0)
I have to remove the last commas of all multiple values (1281,870 0,1281)

output

7829885    7831552    +    1    1667    0
35934936    35937087    -    2    1281,870    0,1281

Thanx

Hi,

Try this.

sed -e 's/,[^0-9]//g' -e 's/,$//g' file_name

Regards,

Ranjith

64,	0,
640

But I need

64  0

I mean a tab is missing so it is combinig 0 with the previous values.
Could please take allook

---------- Post updated at 09:00 PM ---------- Previous update was at 08:58 PM ----------

sed -e 's/,[^0-9]//g' -e 's/,$//g' file_name

Ok i got it

Thanx