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

Crop_size_fix.sh writes to file too often for HPC and is super slow #31

Open
cbird808 opened this issue Aug 15, 2019 · 1 comment
Open

Comments

@cbird808
Copy link
Contributor

need to streamline

@cbird808
Copy link
Contributor Author

cbird808 commented Aug 15, 2019

here's one suggestion:

# Make files that contain all sequence IDs in each OTU

while read p; do
    #orig code
    FHandle=`echo $p | awk '{print $1}'`
    echo $FHandle > $FHandle.cluster.list
    echo $p | awk '{print $2}' | sed -e 's/,/\n/g' >> $FHandle.cluster.list
	
    #CEB alternative that only writes once instead of twice
    FHandle=`echo $p | awk '{print $1}'`
    echo $p | awk '{ for(i=1;i<=NF;i++){ print $i}}' | tr "," "\n" > $FHandle.cluster.list
done <$CROP_LIST

@cbird808 cbird808 changed the title Crop_size_fix.sh writes to file too often for HPC Crop_size_fix.sh writes to file too often for HPC and is super slow Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant