Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd Option for Featrures #12

Closed
RPSeaman opened this issue Aug 16, 2024 · 3 comments
Closed

3rd Option for Featrures #12

RPSeaman opened this issue Aug 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@RPSeaman
Copy link
Collaborator

Description of feature

SYMBOL::SYSTEMATICID

rename feature file and aux gene list

@RPSeaman RPSeaman added the enhancement New feature or request label Aug 16, 2024
@RPSeaman
Copy link
Collaborator Author

#!/bin/bash

mkdir OrigFiles
mkdir UpdatedFiles

mv features.tsv.gz OrigFiles/
mv zfAuxiliaryGeneList.csv OrigFiles/

gzcat OrigFiles/features.tsv.gz | perl -ane 'if ($F[0] ne $F[1]) { print "$F[0]\t$F[1]::$F[0]\tExpression\n"; } else { print "$F[0]\t$F[1]\tExpression\n"; }' | gzip > features.tsv.gz

echo "MTgenes" > UpdatedFiles/MT.csv
cut -f1 -d ","  OrigFiles/zfAuxiliaryGeneList.csv | grep -v "^$" | tail -n +2 | perl -pe "s/^/\\t/;s/$/::/"> UpdatedFiles/origMT.csv
gzcat features.tsv.gz | grep -f UpdatedFiles/origMT.csv | cut -f2 >> UpdatedFiles/MT.csv
rm UpdatedFiles/origMT.csv

echo "G2Mgenes" > UpdatedFiles/G2M.csv
cut -f2 -d ","  OrigFiles/zfAuxiliaryGeneList.csv | grep -v "^$" | tail -n +2 | perl -pe "s/^/\\t/;s/$/::/"> UpdatedFiles/origG2M.csv
gzcat features.tsv.gz | grep -f UpdatedFiles/origG2M.csv | cut -f2 >> UpdatedFiles/G2M.csv
rm UpdatedFiles/origG2M.csv

echo "Sgenes" > UpdatedFiles/S.csv
cut -f3 -d ","  OrigFiles/zfAuxiliaryGeneList.csv | grep -v "^$" | tail -n +2 | perl -pe "s/^/\\t/;s/$/::/"> UpdatedFiles/origS.csv
gzcat features.tsv.gz | grep -f UpdatedFiles/origS.csv | cut -f2 >> UpdatedFiles/S.csv
rm UpdatedFiles/origS.csv

echo "RMgenes" > UpdatedFiles/RM.csv
cut -f4 -d ","  OrigFiles/zfAuxiliaryGeneList.csv | grep -v "^$" | tail -n +2 | perl -pe "s/^/\\t/;s/$/::/"> UpdatedFiles/origRM.csv
gzcat features.tsv.gz | grep -f UpdatedFiles/origRM.csv | cut -f2 >> UpdatedFiles/RM.csv
rm UpdatedFiles/origRM.csv

paste -d ',' UpdatedFiles/MT.csv UpdatedFiles/G2M.csv UpdatedFiles/S.csv UpdatedFiles/RM.csv > AuxGeneList.csv

rm -r UpdatedFiles

@RPSeaman
Copy link
Collaborator Author

^^^ Is an option, depending if it is in R or outside

@Riley-Grindle
Copy link
Collaborator

1st Column - Systematic ID
2nd - Gene name if applicable - otherwise ID

force SO features to use combined Sys::Name format
REGEX check for ENS to determine loupe search term

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants